Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Objectteams » compilation problems with a generic callin binding
compilation problems with a generic callin binding [message #506149] Wed, 06 January 2010 11:10 Go to next message
Eugene Hutorny is currently offline Eugene HutornyFriend
Messages: 109
Registered: January 2010
Senior Member
Method designator binds to a method returning T whereas return type T is specified (OTJLD 4.1(c))
			<T extends Specializable> T castAs(Class<T> type) <- replace T castAs(Class<T> type);
			callin <T extends Specializable> T castAs(Class<T> type) {
				return Education.this.castAs(type);
			}


Two other variations with the generic also fail to compile.
Complete sources to reproduce the problem can be found on this link

Other compilation errors:
The return type of implicitly inherited method Education.Specialist.castAs() is not compatible to the return type of explicitly inherited method Education.Specialist.castAs() (1.3.1(k)).
sources

Internal compiler error: java.lang.NullPointerException at org.objectteams.otdt.core.internal.compiler.mappings.CallinI mplementor.createWrapperMethod(CallinImplementor.java:274)
sources

[Updated on: Wed, 06 January 2010 07:28]

Report message to a moderator

Re: compilation problems with a generic callin binding [message #506222 is a reply to message #506149] Wed, 06 January 2010 15:22 Go to previous message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1048
Registered: July 2009
Senior Member
> Method designator binds to a method returning T whereas return type T is
> specified (OTJLD 4.1(c))
>
> <T extends Specializable> T castAs(Class<T> type) <- replace T
> castAs(Class<T> type); callin <T extends Specializable> T castAs(Class<T>
> type) { return Education.this.castAs(type);
> }
>
>
> Two other variations with the generic also fail to compile.
> Complete sources to reproduce the problem can be found on this
> http://hutorny.in.ua/wp-content/uploads/2010/01/exer4.zip

Thanks for the example. These are in fact variations of an
existing ticket:
https://trac.objectteams.org/ot/ticket/292

In fact, also the "base-call impossible" problem you reported
earlier seems to have the same root cause.

I've scheduled the ticket for the next milestone.

best,
Stephan
Re: compilation problems with a generic callin binding [message #567090 is a reply to message #506149] Wed, 06 January 2010 15:22 Go to previous message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1048
Registered: July 2009
Senior Member
> Method designator binds to a method returning T whereas return type T is
> specified (OTJLD 4.1(c))
>
> <T extends Specializable> T castAs(Class<T> type) <- replace T
> castAs(Class<T> type); callin <T extends Specializable> T castAs(Class<T>
> type) { return Education.this.castAs(type);
> }
>
>
> Two other variations with the generic also fail to compile.
> Complete sources to reproduce the problem can be found on this
> http://hutorny.in.ua/wp-content/uploads/2010/01/exer4.zip

Thanks for the example. These are in fact variations of an
existing ticket:
https://trac.objectteams.org/ot/ticket/292

In fact, also the "base-call impossible" problem you reported
earlier seems to have the same root cause.

I've scheduled the ticket for the next milestone.

best,
Stephan
Previous Topic:ArrayIndexOutOfBoundsException with multithreaded use of a callin
Next Topic:Suggestion on callin bindings
Goto Forum:
  


Current Time: Fri Dec 19 20:12:52 GMT 2014

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

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