bug when passing delegate to ctor. property initializer
Posted: Thu Jan 15, 2009 3:54 am
I've reduced the offending code to this:
The error is in the last line. The error message I get is in Spanish and is quite lengthy, so I let you try it yourself and see what the error looks like in English.
BTW I'm using the latest version from source (0.8.0 post-release).
class DelegateBug
sig Foo
pro op from var as Foo
def defaultOp is shared
pass
def init
_op = ref .defaultOp
def main is shared
x = DelegateBug()
x.op = ref .defaultOp # this works OK
y = DelegateBug(op = ref .defaultOp) # COMPILER ERROR
The error is in the last line. The error message I get is in Spanish and is quite lengthy, so I let you try it yourself and see what the error looks like in English.
BTW I'm using the latest version from source (0.8.0 post-release).