| Summary: | [Xbase] Check overloaded higher order functions | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Sven Efftinge <sven.efftinge> |
| Component: | Xtext | Assignee: | 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 | ||
Merged into master. Requested via bug 522520. -M. Requested via bug 522520. -M. |
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.