Wiki

Changeset 2122

Show
Ignore:
Timestamp:
06/24/09 07:22:18 (3 years ago)
Author:
Chuck.Esterbrook
Message:

Fixed: Invoking a _foo method with no args from within an argument list causes an internal error in the compiler.
reported-by:webnov8

Location:
cobra/trunk
Files:
2 modified

Legend:

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

    r2114 r2122  
    668668        transformTarget._transformTo(postCall) 
    669669 
    670     def _bindImpArgs             
     670    def _bindImpArgs 
    671671        num = 1 
    672         for arg in _args 
     672        for arg in List<of Expr>(_args) 
    673673            try 
    674674                if arg inherits AssignExpr 
    675675                    arg.right.bindImp  # 'x=y' has special treatment in arguments 
    676676                else 
    677                     arg.bindImp 
    678                     assert arg.didBindImp 
     677                    boundArg = arg.bindImp 
     678                    if boundArg is not arg  # transformation 
     679                        _args[num-1] = boundArg 
     680                    assert boundArg.didBindImp 
    679681            catch ne as NodeException 
    680682                ne.prefixMessage('For "[_name]" arg [num]: ') 
  • cobra/trunk/Tests/120-classes/400-methods.cobra

    r2046 r2122  
    9595        assert _someObject2 == 5 
    9696        assert _someObject3.x == 0 and .someObject3.y == 0 
     97        .setXY(_someInt, _someInt)