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 235490 Details for
Bug 417017
[1.8] Incorrect parameters in resolved method binding for LambdaExpression
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]
Test case with modification as a patch
Bug-417017-18-Incorrect-parameters-in-resolved-metho.testcase.patch (text/plain), 2.02 KB, created by
Manoj N Palat
on 2013-09-15 06:51:11 EDT
(
hide
)
Description:
Test case with modification as a patch
Filename:
MIME Type:
Creator:
Manoj N Palat
Created:
2013-09-15 06:51:11 EDT
Size:
2.02 KB
patch
obsolete
>diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter18Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter18Test.java >index 06526c9..347e13f 100644 >--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter18Test.java >+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter18Test.java >@@ -2648,5 +2648,37 @@ > typeBinding = type.resolveBinding(); > assertFalse("A Functional interface", typeBinding.isFunctionalInterface()); > } >+ /** >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=399793 >+ * >+ * @throws JavaModelException >+ */ >+ public void test417017() throws JavaModelException { >+ this.workingCopy = getWorkingCopy("/Converter18/src/test417017/X.java", >+ true/* resolve */); >+ String contents = "package test417017;" >+ + "interface I {\n" >+ + " int foo(int x);\n" >+ + "}\n" >+ + "public class X {\n" >+ + " void fun(int a) {\n" >+ +" I i1 = x1-> x1;\n" >+ +" I i2 = xxx-> {\n" >+ +" i1.foo(a);\n" >+ +" return xxx;\n" >+ +" };\n" >+ +" }\n" >+ +"}\n"; >+ CompilationUnit cu = (CompilationUnit) buildAST(contents, this.workingCopy); >+ TypeDeclaration typedeclaration = (TypeDeclaration) getASTNode(cu, 1); >+ MethodDeclaration methodDeclaration = typedeclaration.getMethods()[0]; >+ VariableDeclarationFragment vdf= (VariableDeclarationFragment) ((VariableDeclarationStatement) methodDeclaration.getBody().statements().get(1)).fragments().get(0); >+ LambdaExpression lambda= (LambdaExpression) vdf.getInitializer(); >+ List parameters = lambda.parameters(); >+ assertTrue("Incorrect Number of parameters", parameters.size() == 1); >+ ITypeBinding[] parameterTypes= lambda.resolveMethodBinding().getParameterTypes(); >+// assertTrue("Incorrect Number of parameter type", parameterTypes.length == 1);// Wrong - see the next line. >+ assertTrue("Incorrect Number of parameter type", parameterTypes.length == 3); // Right - 2 synthetic (OuterLocalVariable) + 1 normal >+ } > > }
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 417017
:
235490
|
235788
|
236060
|
236064
|
236088