Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 87961 Details for
Bug 216686
[1.5][compiler] Failures of inference and overload resolution
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
The test case
Bug5.java (text/plain), 1.63 KB, created by
Olivier Lefevre
on 2008-01-26 21:11:33 EST
(
hide
)
Description:
The test case
Filename:
MIME Type:
Creator:
Olivier Lefevre
Created:
2008-01-26 21:11:33 EST
Size:
1.63 KB
patch
obsolete
>public class Bug5 { > > // some functor and functor instances definitions > > static interface OO<T, E> { public T eval(E x); } > > static interface TO<T> extends OO<String, T> { public String eval(T x); } > > static interface TT extends TO<String> { public String eval(String x); } > > static final TO<Object> FUNC1 = null; > > static final TT FUNC2 = null; > > // some functor combinators > > static <E> TO<E> combine(final TT x, final TO<? super E> y) { // # 1 > return new TO<E>() { public String eval(E o) { return x.eval(y.eval(o)); } }; > } > static <E, T> TO<T> combine(final TO<? super E> x, final OO<E, T> y) { // # 2 > return new TO<T>() { public String eval(T o) { return x.eval(y.eval(o)); } }; > } > static <E, T, V> OO<E, V> combine(final OO<E, ? super T> x, final OO<T, V> y) { // # 3 > return new OO<E, V>() { public E eval(V o) { return x.eval(y.eval(o)); } }; > } > > // body of the test > > static <E> void put(Class<E> type, TO<? super E> func) { } > > static void test() { > put(Integer.class, combine(FUNC2, FUNC1)); > } > > // discussion of the results > > // combo javac-1.6 ecj-3.4M4 workaround > // ----- ------------ ------------ -------------------- > // 1 pass pass > // 2 pass pass > // 3 unapplicable unapplicable (TO<Object>)combine > // 1+2 pass ambiguous Bug5.<Object>combine > // 1+3 pass ambiguous Bug5.<Object>combine > // 2+3 pass pass > // 1+2+3 pass ambiguous Bug5.<Object>combine >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 216686
: 87961 |
88422