|
Re: [Xcore] produces non-compiling Java code when using closures [message #965809 is a reply to message #965783] |
Wed, 31 October 2012 14:14 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Nicolas,
All the parameters should be final in the recent nightly builds. These
builds also include support for extension methods, so you can write toEList.
On 31/10/2012 2:58 PM, Nicolas Cabanis wrote:
> Hello,
>
> I am referring to http://wiki.eclipse.org/Xcore # Specifying an
> Operation.
>
> Assume the following method is added to the Library class:
>
> op Book[] findBooksByAuthor (Author author) {
> return authors.filter [it == author].toList
> }
>
>
> produces two problems:
> 1.) an EList is expected instead of List
> 2.) the generated code contains an anonymous inner class and the
> "author" param is not final
>
> Regards,
> Nicolas
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03553 seconds