Wiki
Show
Ignore:
Timestamp:
03/01/10 05:31:47 (2 years ago)
Author:
Chuck.Esterbrook
Message:

Fixed: The expression SomeNameSpace.SomeClass().someMethod does not invoke someMethod.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • cobra/trunk/Source/Expr.cobra

    r2287 r2297  
    581581            assert type 
    582582            if definition inherits IType    # Box, IVar or GenericParam 
    583                 _transformToPostCallExprOnType(dotNode, definition) 
     583                _transformToPostCallExprOnType(definition) 
    584584                return 
    585585 
     
    678678        return possibleDefinition 
    679679 
    680     def _transformToPostCallExprOnType(dotNode, definition as IType?) 
    681         # for Foo.Bar() where Bar is a box/type 
    682         # Change to a PostCallExpr on the type 'Foo.Bar' 
    683              
    684         # Roll up Foo.Bar.Baz() into one PostCallExpr 
    685         transformTarget = dotNode 
    686         while transformTarget.superNode inherits DotExpr 
    687             transformTarget = transformTarget.superNode to DotExpr 
    688  
    689         postCall = PostCallExpr(.token, TypeExpr(.token, definition), .args).bindImp 
    690         _type = postCall.type to IType 
     680    def _transformToPostCallExprOnType(definition as IType?) 
     681        transformTarget = .superNode to DotExpr 
     682        postCall = PostCallExpr(.token, TypeExpr(.token, definition), .args).bindAll to PostCallExpr 
     683        _type = postCall.type 
    691684        transformTarget._transformTo(postCall) 
    692685