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 233550 Details for
Bug 412650
[1.8][compiler]Incongruent Lambda Exception thrown
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.
[patch]
Same Testcase as a patch
TestCase-patch-for-412650.patch (text/plain), 1.79 KB, created by
Manoj N Palat
on 2013-07-17 05:39:19 EDT
(
hide
)
Description:
Same Testcase as a patch
Filename:
MIME Type:
Creator:
Manoj N Palat
Created:
2013-07-17 05:39:19 EDT
Size:
1.79 KB
patch
obsolete
>diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NegativeLambdaExpressionsTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NegativeLambdaExpressionsTest.java >index c7683b2..acce8fd 100644 >--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NegativeLambdaExpressionsTest.java >+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NegativeLambdaExpressionsTest.java >@@ -6732,6 +6732,38 @@ > null /* custom options */ > ); > } >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=412650, >+//[1.8][compiler]Incongruent Lambda Exception thrown >+public void test412650() { >+ this.runNegativeTest( >+ new String[] { >+ "X.java", >+ "package test;\n" + >+ "import static test.Y.*;\n" + >+ "public class X {\n" + >+ " public void foo() {\n" + >+ " Y<String> generated = cons(\"a\", () -> cons(\"b\", Y::<String>empty));\n" + >+ " }\n" + >+ "}\n", >+ "Y.java", >+ "package test;\n" + >+ "import java.util.function.Supplier;\n" + >+ "public abstract class Y<E> {\n" + >+ " public static <E> Y<E> empty() { return null;}\n" + >+ " public static <E> Y<E> cons(E head, Supplier<Y<E>> tailFun) {return null;}\n" + >+ "}\n" >+ }, >+ "----------\n" + >+ "1. ERROR in X.java (at line 5)\n" + >+ " Y<String> generated = cons(\"a\", () -> cons(\"b\", Y::<String>empty));\n" + >+ " ^^^^\n" + >+ "The method cons(String, () -> cons(\"b\", Y::<String>empty)) is undefined for the type X\n" + >+ "----------\n", >+ null /* no extra class libraries */, >+ true /* flush output directory */, >+ null /* custom options */ >+ ); >+} > public static Class testClass() { > return NegativeLambdaExpressionsTest.class; > }
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 412650
:
233548
| 233550 |
234130
|
234181