Ticket #34 (closed defect: fixed)
Compile error with both isnames and assignment on class var
Reported by: | hopscc | Owned by: | Chuck |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Cobra Compiler | Version: | 0.8.0 |
Keywords: | Cc: |
Description
lines of this form cause a compile error
var name = 'xxx' is public # or any isname
Heres a sample program
class VarIsNameAssign var myVal0 is shared var myVal1 = 'works' var myValBroke = "now not broke" is shared # def main is shared assert not .myVal0 v = VarIsNameAssign() assert v.myVal1 == 'works' a = v b = VarIsNameAssign() assert a is v assert .myValBroke == 'now not broke' # compile error here when broken # error: Expecting an expression. "shared" is a reserved keyword that is not expected here. assert a is v assert a is not b
Due to use of full expr when parsing the assignment - it sucks up the 'is isnameValue' thinking its an 'isRef' check.
The compiler has code to support this (assignment and isnames) but theres no test case for it.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.