Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » IIncompatible implicit return type on short or byte with numeric constants
IIncompatible implicit return type on short or byte with numeric constants [message #1005681] Mon, 28 January 2013 09:11 Go to next message
Tommaso De Sica is currently offline Tommaso De SicaFriend
Messages: 131
Registered: March 2012
Location: Italy
Senior Member

Goodmorning,

I've tryed to use short and byte types in my XBase expression; but I can't assign any numeric constants to them.

If I try to do something like this:
byte b;
b=0;

this error appears:
Quote:
Incompatible implicit return type. Expected byte or java.lang.Byte but was int


Why this?

Thanks.
Re: IIncompatible implicit return type on short or byte with numeric constants [message #1006329 is a reply to message #1005681] Wed, 30 January 2013 21:03 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
the support for byte vs int seems to be buggy in general with xtend/xbase
https://bugs.eclipse.org/bugs/show_bug.cgi?id=382211


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Wed, 30 January 2013 21:04]

Report message to a moderator

Re: IIncompatible implicit return type on short or byte with numeric constants [message #1006330 is a reply to message #1006329] Wed, 30 January 2013 21:14 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
btw casting seem to work byte x = 0 as byte

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Retrieve info from EMF model in UI action and then use it to modify the model itself
Next Topic:Custom error message for unordered groups
Goto Forum:
  


Current Time: Fri Apr 19 22:08:33 GMT 2024

Powered by FUDForum. Page generated in 0.03108 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top