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: 128
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: 6485
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

[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: 6485
Registered: July 2009
Senior Member
btw casting seem to work byte x = 0 as byte
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: Sun Nov 23 16:14:43 GMT 2014

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

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