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 40365 Details for
Bug 140168
Ambiguous Failure in Connection with Varargs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch
vararg.txt (text/plain), 1.62 KB, created by
Kent Johnson
on 2006-05-04 11:50:46 EDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Kent Johnson
Created:
2006-05-04 11:50:46 EDT
Size:
1.62 KB
patch
obsolete
>Index: compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java,v >retrieving revision 1.273 >diff -u -r1.273 Scope.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 28 Apr 2006 14:53:28 -0000 1.273 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 4 May 2006 15:47:38 -0000 >@@ -2544,12 +2544,14 @@ > return true; > } > >- if (one.isVarargs() && two.isVarargs() && oneParamsLength > twoParamsLength) { >- // special case when autoboxing makes (int, int...) better than (Object...) but not (int...) or (Integer, int...) >- if (((ArrayBinding) twoParams[twoParamsLength - 1]).elementsType().id != TypeIds.T_JavaLangObject) >- return false; >+ if (one.isVarargs() && two.isVarargs()) { >+ if (oneParamsLength > twoParamsLength) { >+ // special case when autoboxing makes (int, int...) better than (Object...) but not (int...) or (Integer, int...) >+ if (((ArrayBinding) twoParams[twoParamsLength - 1]).elementsType().id != TypeIds.T_JavaLangObject) >+ return false; >+ } > // check that each parameter before the vararg parameters are compatible (no autoboxing allowed here) >- for (int i = twoParamsLength - 2; i >= 0; i--) >+ for (int i = (oneParamsLength > twoParamsLength ? twoParamsLength : oneParamsLength) - 2; i >= 0; i--) > if (oneParams[i] != twoParams[i] && !oneParams[i].isCompatibleWith(twoParams[i])) > return false; > if (parameterCompatibilityLevel(one, twoParams) == NOT_COMPATIBLE
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 140168
: 40365