Property initialization is executed before properties in creation expression are set
Not completely sure what the semantics should be, but I ran into problems because of this behaviour. Example:
entity Foo {
bar : Int (default=1)
baz : Int (default=bar + 1)
}function newFoo(x: Int): Foo {
return Foo{ bar := x };
}What should the value of
Submitted by Eelco Visser on 30 January 2013 at 10:02newFoo(3).baz
be?
Log in to post comments