And by changing small things about NamePart/InstanceElement usage, we're finally able to pass the class tests again.

This commit is contained in:
Dave Halter
2014-09-24 15:42:44 +02:00
parent f300e63dae
commit 19b32a3657

View File

@@ -246,11 +246,11 @@ def get_instance_el(evaluator, instance, var, is_class_var=False):
"""
if isinstance(var, (Instance, compiled.CompiledObject, pr.Operator, Token,
pr.Module, FunctionExecution, pr.NamePart)):
if isinstance(var, pr.NamePart) and False:
if isinstance(var, pr.NamePart):
# TODO temp solution, remove later, NameParts should never get
# here?
par = get_instance_el(evaluator, instance, var.parent, is_class_var)
return helpers.FakeName(unicode(var), par, var.start_pos)
return pr.NamePart(var._sub_module, unicode(var), par, var.start_pos)
return var
var = wrap(evaluator, var)