Home » Modeling » TMF (Xtext) » Strange operation scoping for Numbers and null
| | | | | |
Re: Strange operation scoping for Numbers and null [message #907618 is a reply to message #907337] |
Tue, 04 September 2012 08:19 |
Ingo Meyer Messages: 162 Registered: July 2009 |
Senior Member |
|
|
Hi Sebastian, Hi Christian,
thanks for the hint.
As I was not able to create a reproducable example, I decided to dive deeper into my code.
I found some very old stuff in my TypeConformanceComputer, which is at least partly responsible for my problem.
In my DSL I want all Numbers to be conformant and my Generator is then responsible for doing the correct transformation in Java. Thats why I had that code in my #isConformant() method:
left = primitives.asWrapperTypeIfPrimitive( left );
right = primitives.asWrapperTypeIfPrimitive( right );
if (typeRefs.isInstanceOf( left, Number.class ) && typeRefs.isInstanceOf( right, Number.class ))
return TypeConformanceResult.SUCCESS;
final TypeConformanceResult result = super.isConformant( left, right, flags );
if (result.isConformant())
return result;
But it is not a good idea to do the wrapping BEFORE the super call. I just moved it after the super call to just be executed when super class returns no success.
Now my linking for primitive numbers is much more as excepted.
Thanks,
~Ingo
|
|
| | | | | | | | |
Re: Strange operation scoping for Numbers and null [message #907652 is a reply to message #907337] |
Tue, 04 September 2012 08:19 |
Ingo Meyer Messages: 162 Registered: July 2009 |
Senior Member |
|
|
Hi Sebastian, Hi Christian,
thanks for the hint.
As I was not able to create a reproducable example, I decided to dive deeper into my code.
I found some very old stuff in my TypeConformanceComputer, which is at least partly responsible for my problem.
In my DSL I want all Numbers to be conformant and my Generator is then responsible for doing the correct transformation in Java. Thats why I had that code in my #isConformant() method:
left = primitives.asWrapperTypeIfPrimitive( left );
right = primitives.asWrapperTypeIfPrimitive( right );
if (typeRefs.isInstanceOf( left, Number.class ) && typeRefs.isInstanceOf( right, Number.class ))
return TypeConformanceResult.SUCCESS;
final TypeConformanceResult result = super.isConformant( left, right, flags );
if (result.isConformant())
return result;
But it is not a good idea to do the wrapping BEFORE the super call. I just moved it after the super call to just be executed when super class returns no success.
Now my linking for primitive numbers is much more as excepted.
Thanks,
~Ingo
|
|
|
Re: Strange operation scoping for Numbers and null [message #907653 is a reply to message #907337] |
Tue, 04 September 2012 08:19 |
Ingo Meyer Messages: 162 Registered: July 2009 |
Senior Member |
|
|
Hi Sebastian, Hi Christian,
thanks for the hint.
As I was not able to create a reproducable example, I decided to dive deeper into my code.
I found some very old stuff in my TypeConformanceComputer, which is at least partly responsible for my problem.
In my DSL I want all Numbers to be conformant and my Generator is then responsible for doing the correct transformation in Java. Thats why I had that code in my #isConformant() method:
left = primitives.asWrapperTypeIfPrimitive( left );
right = primitives.asWrapperTypeIfPrimitive( right );
if (typeRefs.isInstanceOf( left, Number.class ) && typeRefs.isInstanceOf( right, Number.class ))
return TypeConformanceResult.SUCCESS;
final TypeConformanceResult result = super.isConformant( left, right, flags );
if (result.isConformant())
return result;
But it is not a good idea to do the wrapping BEFORE the super call. I just moved it after the super call to just be executed when super class returns no success.
Now my linking for primitive numbers is much more as excepted.
Thanks,
~Ingo
|
|
|
Re: Strange operation scoping for Numbers and null [message #907654 is a reply to message #907337] |
Tue, 04 September 2012 08:22 |
Ingo Meyer Messages: 162 Registered: July 2009 |
Senior Member |
|
|
Hi Sebastian, Hi Christian,
thanks for the hint.
As I was not able to create a reproducable example, I decided to dive deeper into my code.
I found some very old stuff in my TypeConformanceComputer, which is at least partly responsible for my problem.
In my DSL I want all Numbers to be conformant and my Generator is then responsible for doing the correct transformation in Java. Thats why I had that code in my #isConformant() method:
left = primitives.asWrapperTypeIfPrimitive( left );
right = primitives.asWrapperTypeIfPrimitive( right );
if (typeRefs.isInstanceOf( left, Number.class ) && typeRefs.isInstanceOf( right, Number.class ))
return TypeConformanceResult.SUCCESS;
final TypeConformanceResult result = super.isConformant( left, right, flags );
if (result.isConformant())
return result;
But it is not a good idea to do the wrapping BEFORE the super call. I just moved it after the super call to just be executed when super class returns no success.
Now my linking for primitive numbers is much more as excepted.
Thanks,
~Ingo
|
|
|
Re: Strange operation scoping for Numbers and null [message #907663 is a reply to message #907337] |
Tue, 04 September 2012 08:19 |
Ingo Meyer Messages: 162 Registered: July 2009 |
Senior Member |
|
|
Hi Sebastian, Hi Christian,
thanks for the hint.
As I was not able to create a reproducable example, I decided to dive deeper into my code.
I found some very old stuff in my TypeConformanceComputer, which is at least partly responsible for my problem.
In my DSL I want all Numbers to be conformant and my Generator is then responsible for doing the correct transformation in Java. Thats why I had that code in my #isConformant() method:
left = primitives.asWrapperTypeIfPrimitive( left );
right = primitives.asWrapperTypeIfPrimitive( right );
if (typeRefs.isInstanceOf( left, Number.class ) && typeRefs.isInstanceOf( right, Number.class ))
return TypeConformanceResult.SUCCESS;
final TypeConformanceResult result = super.isConformant( left, right, flags );
if (result.isConformant())
return result;
But it is not a good idea to do the wrapping BEFORE the super call. I just moved it after the super call to just be executed when super class returns no success.
Now my linking for primitive numbers is much more as excepted.
Thanks,
~Ingo
|
|
|
Re: Strange operation scoping for Numbers and null [message #907664 is a reply to message #907337] |
Tue, 04 September 2012 08:19 |
Ingo Meyer Messages: 162 Registered: July 2009 |
Senior Member |
|
|
Hi Sebastian, Hi Christian,
thanks for the hint.
As I was not able to create a reproducable example, I decided to dive deeper into my code.
I found some very old stuff in my TypeConformanceComputer, which is at least partly responsible for my problem.
In my DSL I want all Numbers to be conformant and my Generator is then responsible for doing the correct transformation in Java. Thats why I had that code in my #isConformant() method:
left = primitives.asWrapperTypeIfPrimitive( left );
right = primitives.asWrapperTypeIfPrimitive( right );
if (typeRefs.isInstanceOf( left, Number.class ) && typeRefs.isInstanceOf( right, Number.class ))
return TypeConformanceResult.SUCCESS;
final TypeConformanceResult result = super.isConformant( left, right, flags );
if (result.isConformant())
return result;
But it is not a good idea to do the wrapping BEFORE the super call. I just moved it after the super call to just be executed when super class returns no success.
Now my linking for primitive numbers is much more as excepted.
Thanks,
~Ingo
|
|
|
Re: Strange operation scoping for Numbers and null [message #907665 is a reply to message #907337] |
Tue, 04 September 2012 08:22 |
Ingo Meyer Messages: 162 Registered: July 2009 |
Senior Member |
|
|
Hi Sebastian, Hi Christian,
thanks for the hint.
As I was not able to create a reproducable example, I decided to dive deeper into my code.
I found some very old stuff in my TypeConformanceComputer, which is at least partly responsible for my problem.
In my DSL I want all Numbers to be conformant and my Generator is then responsible for doing the correct transformation in Java. Thats why I had that code in my #isConformant() method:
left = primitives.asWrapperTypeIfPrimitive( left );
right = primitives.asWrapperTypeIfPrimitive( right );
if (typeRefs.isInstanceOf( left, Number.class ) && typeRefs.isInstanceOf( right, Number.class ))
return TypeConformanceResult.SUCCESS;
final TypeConformanceResult result = super.isConformant( left, right, flags );
if (result.isConformant())
return result;
But it is not a good idea to do the wrapping BEFORE the super call. I just moved it after the super call to just be executed when super class returns no success.
Now my linking for primitive numbers is much more as excepted.
Thanks,
~Ingo
|
|
|
Re: Strange operation scoping for Numbers and null [message #907677 is a reply to message #907337] |
Tue, 04 September 2012 08:19 |
Ingo Meyer Messages: 162 Registered: July 2009 |
Senior Member |
|
|
Hi Sebastian, Hi Christian,
thanks for the hint.
As I was not able to create a reproducable example, I decided to dive deeper into my code.
I found some very old stuff in my TypeConformanceComputer, which is at least partly responsible for my problem.
In my DSL I want all Numbers to be conformant and my Generator is then responsible for doing the correct transformation in Java. Thats why I had that code in my #isConformant() method:
left = primitives.asWrapperTypeIfPrimitive( left );
right = primitives.asWrapperTypeIfPrimitive( right );
if (typeRefs.isInstanceOf( left, Number.class ) && typeRefs.isInstanceOf( right, Number.class ))
return TypeConformanceResult.SUCCESS;
final TypeConformanceResult result = super.isConformant( left, right, flags );
if (result.isConformant())
return result;
But it is not a good idea to do the wrapping BEFORE the super call. I just moved it after the super call to just be executed when super class returns no success.
Now my linking for primitive numbers is much more as excepted.
Thanks,
~Ingo
|
|
|
Re: Strange operation scoping for Numbers and null [message #907678 is a reply to message #907337] |
Tue, 04 September 2012 08:19 |
Ingo Meyer Messages: 162 Registered: July 2009 |
Senior Member |
|
|
Hi Sebastian, Hi Christian,
thanks for the hint.
As I was not able to create a reproducable example, I decided to dive deeper into my code.
I found some very old stuff in my TypeConformanceComputer, which is at least partly responsible for my problem.
In my DSL I want all Numbers to be conformant and my Generator is then responsible for doing the correct transformation in Java. Thats why I had that code in my #isConformant() method:
left = primitives.asWrapperTypeIfPrimitive( left );
right = primitives.asWrapperTypeIfPrimitive( right );
if (typeRefs.isInstanceOf( left, Number.class ) && typeRefs.isInstanceOf( right, Number.class ))
return TypeConformanceResult.SUCCESS;
final TypeConformanceResult result = super.isConformant( left, right, flags );
if (result.isConformant())
return result;
But it is not a good idea to do the wrapping BEFORE the super call. I just moved it after the super call to just be executed when super class returns no success.
Now my linking for primitive numbers is much more as excepted.
Thanks,
~Ingo
|
|
|
Re: Strange operation scoping for Numbers and null [message #907679 is a reply to message #907337] |
Tue, 04 September 2012 08:22 |
Ingo Meyer Messages: 162 Registered: July 2009 |
Senior Member |
|
|
Hi Sebastian, Hi Christian,
thanks for the hint.
As I was not able to create a reproducable example, I decided to dive deeper into my code.
I found some very old stuff in my TypeConformanceComputer, which is at least partly responsible for my problem.
In my DSL I want all Numbers to be conformant and my Generator is then responsible for doing the correct transformation in Java. Thats why I had that code in my #isConformant() method:
left = primitives.asWrapperTypeIfPrimitive( left );
right = primitives.asWrapperTypeIfPrimitive( right );
if (typeRefs.isInstanceOf( left, Number.class ) && typeRefs.isInstanceOf( right, Number.class ))
return TypeConformanceResult.SUCCESS;
final TypeConformanceResult result = super.isConformant( left, right, flags );
if (result.isConformant())
return result;
But it is not a good idea to do the wrapping BEFORE the super call. I just moved it after the super call to just be executed when super class returns no success.
Now my linking for primitive numbers is much more as excepted.
Thanks,
~Ingo
|
|
|
Re: Strange operation scoping for Numbers and null [message #907691 is a reply to message #907337] |
Tue, 04 September 2012 08:19 |
Ingo Meyer Messages: 162 Registered: July 2009 |
Senior Member |
|
|
Hi Sebastian, Hi Christian,
thanks for the hint.
As I was not able to create a reproducable example, I decided to dive deeper into my code.
I found some very old stuff in my TypeConformanceComputer, which is at least partly responsible for my problem.
In my DSL I want all Numbers to be conformant and my Generator is then responsible for doing the correct transformation in Java. Thats why I had that code in my #isConformant() method:
left = primitives.asWrapperTypeIfPrimitive( left );
right = primitives.asWrapperTypeIfPrimitive( right );
if (typeRefs.isInstanceOf( left, Number.class ) && typeRefs.isInstanceOf( right, Number.class ))
return TypeConformanceResult.SUCCESS;
final TypeConformanceResult result = super.isConformant( left, right, flags );
if (result.isConformant())
return result;
But it is not a good idea to do the wrapping BEFORE the super call. I just moved it after the super call to just be executed when super class returns no success.
Now my linking for primitive numbers is much more as excepted.
Thanks,
~Ingo
|
|
|
Re: Strange operation scoping for Numbers and null [message #907692 is a reply to message #907337] |
Tue, 04 September 2012 08:19 |
Ingo Meyer Messages: 162 Registered: July 2009 |
Senior Member |
|
|
Hi Sebastian, Hi Christian,
thanks for the hint.
As I was not able to create a reproducable example, I decided to dive deeper into my code.
I found some very old stuff in my TypeConformanceComputer, which is at least partly responsible for my problem.
In my DSL I want all Numbers to be conformant and my Generator is then responsible for doing the correct transformation in Java. Thats why I had that code in my #isConformant() method:
left = primitives.asWrapperTypeIfPrimitive( left );
right = primitives.asWrapperTypeIfPrimitive( right );
if (typeRefs.isInstanceOf( left, Number.class ) && typeRefs.isInstanceOf( right, Number.class ))
return TypeConformanceResult.SUCCESS;
final TypeConformanceResult result = super.isConformant( left, right, flags );
if (result.isConformant())
return result;
But it is not a good idea to do the wrapping BEFORE the super call. I just moved it after the super call to just be executed when super class returns no success.
Now my linking for primitive numbers is much more as excepted.
Thanks,
~Ingo
|
|
|
Re: Strange operation scoping for Numbers and null [message #907693 is a reply to message #907337] |
Tue, 04 September 2012 08:22 |
Ingo Meyer Messages: 162 Registered: July 2009 |
Senior Member |
|
|
Hi Sebastian, Hi Christian,
thanks for the hint.
As I was not able to create a reproducable example, I decided to dive deeper into my code.
I found some very old stuff in my TypeConformanceComputer, which is at least partly responsible for my problem.
In my DSL I want all Numbers to be conformant and my Generator is then responsible for doing the correct transformation in Java. Thats why I had that code in my #isConformant() method:
left = primitives.asWrapperTypeIfPrimitive( left );
right = primitives.asWrapperTypeIfPrimitive( right );
if (typeRefs.isInstanceOf( left, Number.class ) && typeRefs.isInstanceOf( right, Number.class ))
return TypeConformanceResult.SUCCESS;
final TypeConformanceResult result = super.isConformant( left, right, flags );
if (result.isConformant())
return result;
But it is not a good idea to do the wrapping BEFORE the super call. I just moved it after the super call to just be executed when super class returns no success.
Now my linking for primitive numbers is much more as excepted.
Thanks,
~Ingo
|
|
|
Re: Strange operation scoping for Numbers and null [message #907710 is a reply to message #907337] |
Tue, 04 September 2012 08:19 |
Ingo Meyer Messages: 162 Registered: July 2009 |
Senior Member |
|
|
Hi Sebastian, Hi Christian,
thanks for the hint.
As I was not able to create a reproducable example, I decided to dive deeper into my code.
I found some very old stuff in my TypeConformanceComputer, which is at least partly responsible for my problem.
In my DSL I want all Numbers to be conformant and my Generator is then responsible for doing the correct transformation in Java. Thats why I had that code in my #isConformant() method:
left = primitives.asWrapperTypeIfPrimitive( left );
right = primitives.asWrapperTypeIfPrimitive( right );
if (typeRefs.isInstanceOf( left, Number.class ) && typeRefs.isInstanceOf( right, Number.class ))
return TypeConformanceResult.SUCCESS;
final TypeConformanceResult result = super.isConformant( left, right, flags );
if (result.isConformant())
return result;
But it is not a good idea to do the wrapping BEFORE the super call. I just moved it after the super call to just be executed when super class returns no success.
Now my linking for primitive numbers is much more as excepted.
Thanks,
~Ingo
|
|
|
Re: Strange operation scoping for Numbers and null [message #907711 is a reply to message #907337] |
Tue, 04 September 2012 08:19 |
Ingo Meyer Messages: 162 Registered: July 2009 |
Senior Member |
|
|
Hi Sebastian, Hi Christian,
thanks for the hint.
As I was not able to create a reproducable example, I decided to dive deeper into my code.
I found some very old stuff in my TypeConformanceComputer, which is at least partly responsible for my problem.
In my DSL I want all Numbers to be conformant and my Generator is then responsible for doing the correct transformation in Java. Thats why I had that code in my #isConformant() method:
left = primitives.asWrapperTypeIfPrimitive( left );
right = primitives.asWrapperTypeIfPrimitive( right );
if (typeRefs.isInstanceOf( left, Number.class ) && typeRefs.isInstanceOf( right, Number.class ))
return TypeConformanceResult.SUCCESS;
final TypeConformanceResult result = super.isConformant( left, right, flags );
if (result.isConformant())
return result;
But it is not a good idea to do the wrapping BEFORE the super call. I just moved it after the super call to just be executed when super class returns no success.
Now my linking for primitive numbers is much more as excepted.
Thanks,
~Ingo
|
|
|
Re: Strange operation scoping for Numbers and null [message #907712 is a reply to message #907337] |
Tue, 04 September 2012 08:22 |
Ingo Meyer Messages: 162 Registered: July 2009 |
Senior Member |
|
|
Hi Sebastian, Hi Christian,
thanks for the hint.
As I was not able to create a reproducable example, I decided to dive deeper into my code.
I found some very old stuff in my TypeConformanceComputer, which is at least partly responsible for my problem.
In my DSL I want all Numbers to be conformant and my Generator is then responsible for doing the correct transformation in Java. Thats why I had that code in my #isConformant() method:
left = primitives.asWrapperTypeIfPrimitive( left );
right = primitives.asWrapperTypeIfPrimitive( right );
if (typeRefs.isInstanceOf( left, Number.class ) && typeRefs.isInstanceOf( right, Number.class ))
return TypeConformanceResult.SUCCESS;
final TypeConformanceResult result = super.isConformant( left, right, flags );
if (result.isConformant())
return result;
But it is not a good idea to do the wrapping BEFORE the super call. I just moved it after the super call to just be executed when super class returns no success.
Now my linking for primitive numbers is much more as excepted.
Thanks,
~Ingo
|
|
|
Re: Strange operation scoping for Numbers and null [message #907733 is a reply to message #907337] |
Tue, 04 September 2012 08:19 |
Ingo Meyer Messages: 162 Registered: July 2009 |
Senior Member |
|
|
Hi Sebastian, Hi Christian,
thanks for the hint.
As I was not able to create a reproducable example, I decided to dive deeper into my code.
I found some very old stuff in my TypeConformanceComputer, which is at least partly responsible for my problem.
In my DSL I want all Numbers to be conformant and my Generator is then responsible for doing the correct transformation in Java. Thats why I had that code in my #isConformant() method:
left = primitives.asWrapperTypeIfPrimitive( left );
right = primitives.asWrapperTypeIfPrimitive( right );
if (typeRefs.isInstanceOf( left, Number.class ) && typeRefs.isInstanceOf( right, Number.class ))
return TypeConformanceResult.SUCCESS;
final TypeConformanceResult result = super.isConformant( left, right, flags );
if (result.isConformant())
return result;
But it is not a good idea to do the wrapping BEFORE the super call. I just moved it after the super call to just be executed when super class returns no success.
Now my linking for primitive numbers is much more as excepted.
Thanks,
~Ingo
|
|
|
Re: Strange operation scoping for Numbers and null [message #907734 is a reply to message #907337] |
Tue, 04 September 2012 08:19 |
Ingo Meyer Messages: 162 Registered: July 2009 |
Senior Member |
|
|
Hi Sebastian, Hi Christian,
thanks for the hint.
As I was not able to create a reproducable example, I decided to dive deeper into my code.
I found some very old stuff in my TypeConformanceComputer, which is at least partly responsible for my problem.
In my DSL I want all Numbers to be conformant and my Generator is then responsible for doing the correct transformation in Java. Thats why I had that code in my #isConformant() method:
left = primitives.asWrapperTypeIfPrimitive( left );
right = primitives.asWrapperTypeIfPrimitive( right );
if (typeRefs.isInstanceOf( left, Number.class ) && typeRefs.isInstanceOf( right, Number.class ))
return TypeConformanceResult.SUCCESS;
final TypeConformanceResult result = super.isConformant( left, right, flags );
if (result.isConformant())
return result;
But it is not a good idea to do the wrapping BEFORE the super call. I just moved it after the super call to just be executed when super class returns no success.
Now my linking for primitive numbers is much more as excepted.
Thanks,
~Ingo
|
|
|
Re: Strange operation scoping for Numbers and null [message #907735 is a reply to message #907337] |
Tue, 04 September 2012 08:22 |
Ingo Meyer Messages: 162 Registered: July 2009 |
Senior Member |
|
|
Hi Sebastian, Hi Christian,
thanks for the hint.
As I was not able to create a reproducable example, I decided to dive deeper into my code.
I found some very old stuff in my TypeConformanceComputer, which is at least partly responsible for my problem.
In my DSL I want all Numbers to be conformant and my Generator is then responsible for doing the correct transformation in Java. Thats why I had that code in my #isConformant() method:
left = primitives.asWrapperTypeIfPrimitive( left );
right = primitives.asWrapperTypeIfPrimitive( right );
if (typeRefs.isInstanceOf( left, Number.class ) && typeRefs.isInstanceOf( right, Number.class ))
return TypeConformanceResult.SUCCESS;
final TypeConformanceResult result = super.isConformant( left, right, flags );
if (result.isConformant())
return result;
But it is not a good idea to do the wrapping BEFORE the super call. I just moved it after the super call to just be executed when super class returns no success.
Now my linking for primitive numbers is much more as excepted.
Thanks,
~Ingo
|
|
|
Goto Forum:
Current Time: Wed Sep 25 10:23:13 GMT 2024
Powered by FUDForum. Page generated in 0.30491 seconds
|