Hi,
Say that I create an abstract class with a single abstract method, but with other members:
import org.junit.Test
abstract class Performer {
def perform() { println('hello!') }
def abstract void hello()
}
import org.junit.Test
@Test def void test() {
work [| perform ] // gives error, perform is not accessible..
}
def void work(Performer p) {
p.hello
}
}
Why is this? The member is there in the created anonymous class in the created source code after all.
Christian
To answer my own question, is it because the ‘this’ of the created lambda is set to the current instance, to allow for closure programming?
--
You received this message because you are subscribed to a topic in the Google Groups "Xtend Programming Language" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/xtend-lang/lJfCQRj9eHo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to xtend-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Xtend Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xtend-lang+...@googlegroups.com.
great! thanks