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 53369 Details for
Bug 162026
[1.5][compiler] Erroneous Report of an Ambiguous Method
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Safer patch (more conservative)
org.eclipse.jdt.core_02.txt (text/plain), 2.50 KB, created by
Maxime Daniel
on 2006-11-07 09:56:10 EST
(
hide
)
Description:
Safer patch (more conservative)
Filename:
MIME Type:
Creator:
Maxime Daniel
Created:
2006-11-07 09:56:10 EST
Size:
2.50 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java,v >retrieving revision 1.288 >diff -u -r1.288 Scope.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 25 Oct 2006 11:21:55 -0000 1.288 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 7 Nov 2006 14:59:16 -0000 >@@ -3188,6 +3188,7 @@ > return problemMethod; > } > >+ // caveat: this is not a direct implementation of JLS > protected final MethodBinding mostSpecificMethodBinding(MethodBinding[] visible, int visibleSize, TypeBinding[] argumentTypes, InvocationSite invocationSite, ReferenceBinding receiverType) { > int[] compatibilityLevels = new int[visibleSize]; > for (int i = 0; i < visibleSize; i++) >@@ -3324,8 +3325,11 @@ > original2 = original.computeSubstitutedMethod(original2, environment()); > if (original2 == null || !original.areParameterErasuresEqual(original2)) > continue nextSpecific; // current does not override next >- if (!original.returnType.isCompatibleWith(original2.returnType)) // 15.12.2 >+ if (!original.returnType.isCompatibleWith(original2.returnType) && >+ !original.returnType.erasure().isCompatibleWith(original2.returnType.erasure())) { >+ // 15.12.2 > continue nextSpecific; // choose original2 instead >+ } > if (original.thrownExceptions != original2.thrownExceptions) { > if (mostSpecificExceptions == null) > mostSpecificExceptions = original.thrownExceptions; >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java,v >retrieving revision 1.23 >diff -u -r1.23 AmbiguousMethodTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java 7 Nov 2006 12:58:19 -0000 1.23 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java 7 Nov 2006 14:59:21 -0000 >@@ -1076,7 +1076,7 @@ > "2"); > } > // https://bugs.eclipse.org/bugs/show_bug.cgi?id=162026 >-public void _test025() { >+public void test025() { > this.runConformTest( > new String[] { > "X.java",
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 162026
:
52818
| 53369