[xtend2.2] Semantics of "it" with "switch" [message #763162] |
Fri, 09 December 2011 04:31  |
Eclipse User |
|
|
|
Hi,
I just upgraded to xtend 2.2 and experience the following (minor) issue.
In my xtend class, I am using the "it" special variable in combination with a switch-to-subclass expression (TBase and TSome are EMF classes and TBase is base class of TSome):
def generate(TBase it) {
switch (it) {
TSome: name + " because " + purpose
// ...
}
}
name is an attribute of the base class TBase and works fine. purpose is an attribute of TSome, this gives an error marker Couldn't resolve reference to JvmIdentifiableElement 'purpose'. This can be fixed by explicitly using it.purpose.
I don't know what is intended here, but I guess the behavior changed from 2.1 to 2.2.
Regards,
Klaus
|
|
|
|
Re: [xtend2.2] Semantics of "it" with "switch" [message #763250 is a reply to message #763245] |
Fri, 09 December 2011 07:28  |
Eclipse User |
|
|
|
The ticket is already here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=365306
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Am 09.12.11 13:16, schrieb Sven Efftinge:
> Yes, that's a know bug. But I don't think we have a bugreport yet.
>
> Sven
>
> Am 12/9/11 10:31 AM, schrieb Klaus Birken:
>> Hi,
>>
>> I just upgraded to xtend 2.2 and experience the following (minor) issue.
>>
>> In my xtend class, I am using the "it" special variable in combination
>> with a switch-to-subclass expression (TBase and TSome are EMF classes
>> and TBase is base class of TSome):
>>
>> def generate(TBase it) {
>> switch (it) {
>> TSome: name + " because " + purpose
>> // ...
>> }
>> }
>>
>>
>> name is an attribute of the base class TBase and works fine. purpose is
>> an attribute of TSome, this gives an error marker Couldn't resolve
>> reference to JvmIdentifiableElement 'purpose'. This can be fixed by
>> explicitly using it.purpose.
>>
>> I don't know what is intended here, but I guess the behavior changed
>> from 2.1 to 2.2.
>>
>> Regards,
>> Klaus
>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04137 seconds