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 221454 Details for
Bug 382907
IMethodBinding.isSubsignature returns wrong results with generics
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
Testcase for bug-382907.patch (text/plain), 2.16 KB, created by
Jay Arthanareeswaran
on 2012-09-25 04:07:25 EDT
(
hide
)
Description:
Test case
Filename:
MIME Type:
Creator:
Jay Arthanareeswaran
Created:
2012-09-25 04:07:25 EDT
Size:
2.16 KB
patch
obsolete
>diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java >index e67367d..b68ede2 100644 >--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java >+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java >@@ -11452,5 +11452,42 @@ > deleteProject(jp); > } > } >- >+ public void testBug382907() throws JavaModelException { >+ this.workingCopy = getWorkingCopy("/Converter15/src/Implement.java", true/*resolve*/); >+ String contents = >+ "public class Implement {\n" + >+ " public interface I<T> {\n" + >+ " void m(T t);\n" + >+ " T m2();\n" + >+ " } \n"+ >+ " public static class S<T> implements I<T> {\n" + >+ " public void m(T t) {\n" + >+ " }\n" + >+ " public T m2() {\n" + >+ " return null;\n" + >+ " }\n" + >+ " }\n" + >+ "}\n" + >+ "class BaseCall {\n" + >+ " public interface I<T> extends Implement.I<T> {\n" + >+ " void m(T t);\n" + >+ " T m2();\n" + >+ " }\n" + >+ " public static class X<T> extends Implement.S<T> implements I<T> {\n" + >+ " }\n" + >+ "}\n"; >+ >+ ASTNode node = buildAST( >+ contents, >+ this.workingCopy); >+ assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); >+ CompilationUnit unit = (CompilationUnit) node; >+ node = (ASTNode)((AbstractTypeDeclaration)((AbstractTypeDeclaration)unit.types().get(1)).bodyDeclarations().get(0)).bodyDeclarations().get(0); >+ IMethodBinding mb = ((MethodDeclaration) node).resolveBinding(); >+ node = (ASTNode)((AbstractTypeDeclaration)((AbstractTypeDeclaration)unit.types().get(0)).bodyDeclarations().get(0)).bodyDeclarations().get(0); >+ IMethodBinding sm = ((MethodDeclaration) node).resolveBinding(); >+ System.out.println("node: " + mb); >+ System.out.println("node: " + sm); >+ assertTrue("isSubsignature should return true", sm.isSubsignature(mb)); >+ } > } >\ No newline at end of file
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 382907
: 221454