Wiki

Ticket #222: var-initializer-bindint.patch

File var-initializer-bindint.patch, 1.4 KB (added by hopscc, 14 years ago)
  • Source/Members.cobra

     
    12771280    get returnTypeNode from var 
    12781281 
    12791282    get resultType as IType is override 
     1283        if not .didBindInt, .bindInt #  to call a method from a var/const initializer 
    12801284        assert .didBindInt 
    12811285        assert _returnType 
    12821286        return _returnType to ! 
  • Tests/320-misc-two/502-bug-var-initialiser-bindint.cobra

     
     1# Ticket:222 CIE assertExc bindInt on expression in initializer 
     2class Program 
     3 
     4    var   a as int is shared 
     5    var d = 2 * .e # was COBRA INTERNAL ERROR 
     6 
     7    def main 
     8        pass 
     9 
     10    get e as int is shared  # BTW, same with or without shared. 
     11        return 2 
  • Developer/IntermediateReleaseNotes.text

     
    479479* Fixed: Some invariants cause an internal error.  ticket:248 
    480480 
    481481* Fixed: Bad code gen for structs containing ref types.  ticket:238 
     482 
     483* Fixed: Bad attempt to declare var or constant causes COBRA INTERNAL ERROR. ticket:222