Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Objectteams » Callin method, signature, identity
Callin method, signature, identity [message #629822] Wed, 29 September 2010 16:15 Go to next message
Jan Marc Hoffmann is currently offline Jan Marc Hoffmann
Messages: 32
Registered: July 2009
Member
Hey guys,

I might have just stumbled upon another issue. Either my unterstand or a compiler bug.

I have just written the following code:

	@SuppressWarnings("restriction")
	protected class GOTLookupEnvironment playedBy LookupEnvironment {
		@SuppressWarnings("decapsulation")
		ReferenceBinding askForType(PackageBinding packageBinding, char[] name) <- replace ReferenceBinding askForType(PackageBinding packageBinding, char[] name);
		
		callin ReferenceBinding askForType(PackageBinding packageBinding, char[] name) {
			GOTMetaTypeMapping tm = GOTMetaTypeMapping.getDefault();
			if(tm.hasJavaTypeEquivalent(name)) {				
				return askForType(tm.getJavaTypeAsCharArray(name));
			}
			return base.askForType(packageBinding, name);
		}
	}


Which yields the following error message:

Method askForType(char[][]) cannot be called explicitly; is a callin method (OTJLD 4.2(d)). GOTLookupAdapter.java /org.objectteams.gotdt/src/org/objectteams/gotdt/internal/co mpiler/lookup line 52 Java Problem

For my understanding the callin method has the signature
askForType(PackageBinding packageBinding, char[] name); and not askForType(char[][] name); which is another method in the same base.

So how is a callin on a method defined? By the signature or just the method name?

greetings

Jan Marc
Re: Callin method, signature, identity [message #629824 is a reply to message #629822] Wed, 29 September 2010 16:33 Go to previous messageGo to next message
Jan Marc Hoffmann is currently offline Jan Marc Hoffmann
Messages: 32
Registered: July 2009
Member
The above example works when an explicit callout is added.

ReferenceBinding askForType(char[][] compoundName) -> ReferenceBinding askForType(char[][] compoundName);


So i guess its a bug. :=)
Re: Callin method, signature, identity [message #630098 is a reply to message #629824] Thu, 30 September 2010 15:53 Go to previous message
Stephan Herrmann is currently offline Stephan Herrmann
Messages: 1022
Registered: July 2009
Senior Member
Jan Marc Hoffmann wrote on Wed, 29 September 2010 18:33

So i guess its a bug. :=)

Indeed so, and its name be Bug 326689

thanks for the report,
Stephan
Previous Topic:Service Release 0.7.1 to match Eclipse 3.6.1
Next Topic:The Road Ahead - Request for Feedback
Goto Forum:
  


Current Time: Wed Oct 22 09:44:44 GMT 2014

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

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