Show
Ignore:
Timestamp:
08/18/08 11:40:51 (5 months ago)
Author:
Chuck.Esterbrook
Message:

Fix a bug in partial class support.

Files:
1 modified

Legend:

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

    r1581 r1582  
    17481748                                # _foo(x) --> ._foo(x) 
    17491749                                newCall = CallExpr(.token, .name, .args) 
    1750                                 dotted = DotExpr(.token, 'DOT', ThisLit(.token, .curCodeMember.box), newCall, true).bindImp 
     1750                                dotted = DotExpr(.token, 'DOT', ThisLit(.token), newCall, true).bindImp 
    17511751                                _type = dotted.type to IType 
    17521752                                _transformTo(dotted) 
     
    29422942 
    29432943class ThisOrBaseLit 
     2944        is abstract 
    29442945        inherits AtomicLiteral 
    2945  
    2946         def init(token as IToken, box as Box) 
    2947                 base.init(token) 
    2948                 _type = box 
     2946        """ 
     2947        The "current box" used to be passed to .init rather than referenced in _bindImp, but that 
     2948        didn't work well with partial classes. Also, it's not necessary to creating a ThisOrBaseLit. 
     2949        """ 
     2950 
     2951        def init(token as IToken) 
     2952                base.init(token) 
    29492953 
    29502954        def _bindImp 
    29512955                base._bindImp 
     2956                _type = .compiler.curBox 
    29522957                if _type inherits Extension 
    29532958                        _type = _type.extendedBox 
     
    29572962        inherits ThisOrBaseLit 
    29582963 
    2959         def init(token as IToken, box as Box) 
    2960                 base.init(token, box) 
     2964        def init(token as IToken) 
     2965                base.init(token) 
    29612966 
    29622967        def checkType is override 
     
    29842989        # "this" (unless C# allows that which I doubt) 
    29852990 
    2986         def init(token as IToken, box as Box) 
    2987                 base.init(token, box) 
     2991        def init(token as IToken) 
     2992                base.init(token) 
    29882993 
    29892994        get isExplicit as bool