Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 326689

Summary: [compiler] inferred callout not working with overloads and same-named callin method
Product: [Tools] Objectteams Reporter: Stephan Herrmann <stephan.herrmann>
Component: OTJAssignee: Stephan Herrmann <stephan.herrmann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 0.7.1   
Target Milestone: 0.8 M3   
Hardware: Other   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
fix none

Description Stephan Herrmann CLA 2010-09-30 11:50:39 EDT
From http://www.eclipse.org/forums/index.php?t=msg&th=197535&start=0&S=406fa41b7995a015a0d146c658fb332a

When a base class has two methods with the same name, a bound role cannot
callin bind one overload and also use inferred callout to the other overload.

The compiler wrongly flags
Method askForType(char[][]) cannot be called explicitly; is a callin method (OTJLD 4.2(d)).

At seems that the check for the 'callin' modifier does not respect overloading
and prematurely aborts callout inference.
Comment 1 Stephan Herrmann CLA 2010-09-30 12:13:30 EDT
Created attachment 179978 [details]
fix

This patch fixes the issue basically by just swapping the order
of callout inference and checking the 'callin' flag.

See witness in test3117_inferredCallout10()
Comment 2 Stephan Herrmann CLA 2010-09-30 12:15:01 EDT
Fix has been committed as r923.
Comment 3 Stephan Herrmann CLA 2010-11-10 18:37:17 EST
Verified for 0.8 M3 using build 201011100445