Changeset 1709

Show
Ignore:
Timestamp:
10/26/08 22:23:23 (2 months ago)
Author:
Chuck.Esterbrook
Message:

Fixed a bug with extended initializers regarding using them in combination with var declarations.
No release notes since extended initializers were added post-release.
reported-by:gauthier

Location:
cobra/trunk
Files:
3 modified

Legend:

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

    r1671 r1709  
    545545                        for invari in _invariants 
    546546                                invari.bindInt 
    547                         for decl in _declsInOrder 
     547                        for decl in List<of IBoxMember>(_declsInOrder) 
    548548                                assert not decl is this 
    549549                                .compiler.boxMemberStack.push(decl) 
  • cobra/trunk/Source/Expr.cobra

    r1708 r1709  
    15571557                m.addStmt(retStmt) 
    15581558 
    1559                 m.bindAll 
     1559                if .compiler.isBindingInt, m.bindInt  # happens for: var foo = Bar(baz=1) 
     1560                else, m.bindAll 
    15601561                box.addDecl(m) 
    15611562                _helperMethod = m 
  • cobra/trunk/Tests/120-classes/320-construct-prop-set.cobra

    r1708 r1709  
    5353 
    5454        var _data as dynamic? 
     55        var _stuff = Stuff(a='a', b='b')  # test in var decl 
    5556 
    5657        def init(s as Stuff?)