Re: Behavior of .with() inside Trait

2016-02-11 Thread Gerald Wiltse
Thanks for the input Schalk, Can anyone else indicate if this looks like a bug, or an intended behavior? If so, I can submit the bug. Gerald R. Wiltse jerrywil...@gmail.com On Wed, Feb 10, 2016 at 11:04 AM, Schalk Cronjé wrote: > The interesting thing about this for me is that for > > bind

Re: Behavior of .with() inside Trait

2016-02-10 Thread Schalk Cronjé
The interesting thing about this for me is that for binding.with { println cow } the generated code is public static java.lang.Object action(Foo $self) { return $self .binding.with({ return $self.println( $self .cow) }.rehydrate($self, $self, $self))

Behavior of .with() inside Trait

2016-02-10 Thread Gerald Wiltse
This example returns the error inside the with closure: "No such property: cow for class:Bar" It seems .with() in a trait does not resolve the way it "normally" does. trait Foo { def action() { println binding.cow binding.with { println cow } }