Changeset 1765

Show
Ignore:
Timestamp:
11/15/08 19:44:42 (8 weeks ago)
Author:
Chuck.Esterbrook
Message:

Shore up a missing warning about: Unnecessary parentheses

Location:
cobra/trunk
Files:
2 modified

Legend:

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

    r1764 r1765  
    499499                        # TODO: 
    500500                        # if .definition inherits BoxMember and .definition.isMethod and not dotNode.isImplicit 
    501                         if (.definition inherits Method or .definition inherits MemberOverload) and not dotNode.isImplicit 
     501                        if (.definition inherits AbstractMethod or .definition inherits MemberOverload) and not dotNode.isImplicit 
    502502                                .compiler.warning(this, 'Unnecessary parentheses. You can remove them.') 
    503503                else 
  • cobra/trunk/Tests/120-classes/304-construct-base-no-parens.cobra

    r1177 r1765  
    1515 
    1616        def init 
    17                 base.init  # <-- used to create a false error 
     17                base.init  # test base.init call with no args 
    1818                _c = true 
    1919 
    2020        get c from var 
     21 
     22 
     23class Truck 
     24        inherits Vehicle 
     25         
     26        def init 
     27                base.init()  # .warning. Unnecessary parentheses 
    2128 
    2229