Test for qualified name of function

This commit is contained in:
mancoast
2015-04-17 09:51:00 -04:00
parent 805caa7ca0
commit eb04199d98
2 changed files with 9 additions and 0 deletions

View File

@@ -1258,6 +1258,15 @@ PycRef<ASTNode> BuildFromCode(PycRef<PycCode> code, PycModule* mod)
{
PycRef<ASTNode> code = stack.top();
stack.pop();
/* Test for the qualified name of the function (at TOS) */
int tos_type = code.cast<ASTObject>()->object()->type();
if (tos_type != PycObject::TYPE_CODE &&
tos_type != PycObject::TYPE_CODE2) {
code = stack.top();
stack.pop();
}
ASTFunction::defarg_t defArgs;
for (int i=0; i<operand; i++) {
defArgs.push_front(stack.top());

BIN
tests/34_test_func.pyc Normal file

Binary file not shown.