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 26522 Details for
Bug 105808
[1.5][dom] MethodBinding#overrides(..) should not consider return types
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Regression test
patch105808_org.eclipse.jdt.core.tests.model.txt (text/plain), 1.72 KB, created by
Jerome Lanneluc
on 2005-08-26 05:05:57 EDT
(
hide
)
Description:
Regression test
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2005-08-26 05:05:57 EDT
Size:
1.72 KB
patch
obsolete
>Index: src/org/eclipse/jdt/core/tests/dom/CompatibilityRulesTests.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/CompatibilityRulesTests.java,v >retrieving revision 1.12 >diff -u -r1.12 CompatibilityRulesTests.java >--- src/org/eclipse/jdt/core/tests/dom/CompatibilityRulesTests.java 14 Jun 2005 10:24:54 -0000 1.12 >+++ src/org/eclipse/jdt/core/tests/dom/CompatibilityRulesTests.java 26 Aug 2005 09:03:43 -0000 >@@ -670,4 +670,39 @@ > }); > assertTrue("Y#foo(String) should override X#foo(T)", bindings[0].overrides(bindings[1])); > } >+ >+ /* >+ * Ensures that a method in a subtype overrides the corresponding method in the super type >+ * even if the two methods have different return types. >+ * (regression test for bug 105808 [1.5][dom] MethodBinding#overrides(..) should not consider return types) >+ */ >+ public void test031() throws CoreException { >+ try { >+ IJavaProject project = createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, "", "1.4"); >+ IMethodBinding[] bindings = createMethodBindings( >+ new String[] { >+ "/P/p1/X.java", >+ "package p1;\n" + >+ "public class X {\n" + >+ " Object foo() {\n" + >+ " }\n" + >+ "}", >+ "/P/p1/Y.java", >+ "package p1;\n" + >+ "public class Y extends X {\n" + >+ " String foo() {\n" + >+ " }\n" + >+ "}", >+ }, >+ new String[] { >+ "Lp1/Y;.foo()Ljava/lang/String;", >+ "Lp1/X;.foo()Ljava/lang/Object;" >+ }, >+ project); >+ assertTrue("Y#foo() should override X#foo()", bindings[0].overrides(bindings[1])); >+ } finally { >+ deleteProject("P2"); >+ } >+ } >+ > }
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 105808
: 26522