Ticket #260 (closed defect: fixed)
expressions receive wrong type
Reported by: | blubb | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Cobra Compiler | Version: | 0.8.0 |
Keywords: | Cc: |
Description
the following code does not compile:
class Oops def main if (0 == 0) == true print "okay"
It fails with the error:
/home/blubb/cobra-workspace/Source/oops.cobra(4): warning: Unnecessary parentheses around expression. You can remove them. /home/blubb/cobra-workspace/Source/oops.cobra(4): error: The left and right sides of the "==" expression cannot be equated because of their types ("int" and "bool").
when removing the == true, everything works as expected
Change History
Note: See
TracTickets for help on using
tickets.