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

Bug 366359

Summary: [Xbase] Check overloaded higher order functions
Product: [Modeling] TMF Reporter: Sven Efftinge <sven.efftinge>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow
Version: 2.2.0   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard: v2.5
Bug Depends on:    
Bug Blocks: 406048    

Description Sven Efftinge CLA 2011-12-12 03:38:38 EST
If a higher-order function is overloaded like this :

def foo (Function1<String,Boolean predicate) {
}

def foo(Predicate<String> predicate) { // the one from guava
}

It's not clear which one to invoke for the following expression:

foo( e | true )

The expression should therefore be marked as errorneous suggesting adding an explicit cast.
We could alternatively consider to have a higher precedence for Xbase's function types. Java8 might be a good source for deciding this.
Comment 1 Sebastian Zarnekow CLA 2013-09-15 07:15:03 EDT
Merged into master.
Comment 2 Eclipse Webmaster CLA 2017-10-31 10:48:06 EDT
Requested via bug 522520.

-M.
Comment 3 Eclipse Webmaster CLA 2017-10-31 10:59:08 EDT
Requested via bug 522520.

-M.