Boo

WARNING: Assignment/Comparison made to/with same expression.

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 0.8.2
  • Fix Version/s: 0.9
  • Component/s: Compiler
  • Labels:
    None
  • Testcase included:
    yes
  • Number of attachments :
    1

Description

Test.Foo = Test.Foo
print "what?" if Test.Foo == Test.Foo

Should issue:

BCW0020: WARNING: Assignment made to same expression. Did you mean to assign to something else?
BCW0021: WARNING: Comparison made with same expression. Did you mean to compare with something else?

Activity

Hide
Cedric Vivier added a comment -

I have patch ready but I have some weird problem when building PatternMatching (and PatternMatching only, ie. Extensions and Useful build fine for instance) :

I've changed ast.model.boo to set explicit values to BinaryOperatorType such as we can have a BinaryOperatorMask enum in order to more efficiently compare an operator to an operator group/kind (instead of a flurry of "|| ... ||").
For some reason PatternMatching build fails cause it seems to use the old values before that change but I cannot see how and why is it the only one to do this. Any ideas??

Show
Cedric Vivier added a comment - I have patch ready but I have some weird problem when building PatternMatching (and PatternMatching only, ie. Extensions and Useful build fine for instance) : I've changed ast.model.boo to set explicit values to BinaryOperatorType such as we can have a BinaryOperatorMask enum in order to more efficiently compare an operator to an operator group/kind (instead of a flurry of "|| ... ||"). For some reason PatternMatching build fails cause it seems to use the old values before that change but I cannot see how and why is it the only one to do this. Any ideas??
Hide
Cedric Vivier added a comment -

Attached the patch so that you guys can try it. There must be something very stupid I overlook :-s

Show
Cedric Vivier added a comment - Attached the patch so that you guys can try it. There must be something very stupid I overlook :-s
Hide
Cedric Vivier added a comment -

Landed in rev. 3146

Show
Cedric Vivier added a comment - Landed in rev. 3146

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: