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 40693 Details for
Bug 140643
[compiler] $foo() not found in anonymous type
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
140643.txt (text/plain), 3.30 KB, created by
Philipe Mulet
on 2006-05-09 05:13:19 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Philipe Mulet
Created:
2006-05-09 05:13:19 EDT
Size:
3.30 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java,v >retrieving revision 1.122 >diff -u -r1.122 TypeDeclaration.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java 4 Apr 2006 07:43:11 -0000 1.122 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java 9 May 2006 09:15:03 -0000 >@@ -328,7 +328,7 @@ > constructor.constructorCall.sourceEnd = this.sourceEnd; > } > >- //adding the constructor in the methods list >+ //adding the constructor in the methods list: rank is not critical since bindings will be sorted > if (needToInsert) { > if (this.methods == null) { > this.methods = new AbstractMethodDeclaration[] { constructor }; >@@ -347,7 +347,7 @@ > return constructor; > } > >-// anonymous type constructor creation >+// anonymous type constructor creation: rank is important since bindings already got sorted > public MethodBinding createDefaultConstructorWithBinding(MethodBinding inheritedConstructorBinding) { > //Add to method'set, the default constuctor that just recall the > //super constructor with the same arguments >@@ -390,37 +390,29 @@ > this.methods = new AbstractMethodDeclaration[] { constructor }; > } else { > AbstractMethodDeclaration[] newMethods; >- System.arraycopy( >- this.methods, >- 0, >- newMethods = new AbstractMethodDeclaration[this.methods.length + 1], >- 1, >- this.methods.length); >+ System.arraycopy(this.methods, 0, newMethods = new AbstractMethodDeclaration[this.methods.length + 1], 1, this.methods.length); > newMethods[0] = constructor; > this.methods = newMethods; > } > > //============BINDING UPDATE========================== >+ SourceTypeBinding sourceType = this.binding; > constructor.binding = new MethodBinding( > constructor.modifiers, //methodDeclaration > argumentsLength == 0 ? Binding.NO_PARAMETERS : argumentTypes, //arguments bindings > inheritedConstructorBinding.thrownExceptions, //exceptions >- this.binding); //declaringClass >+ sourceType); //declaringClass > > constructor.scope = new MethodScope(this.scope, constructor, true); > constructor.bindArguments(); > constructor.constructorCall.resolve(constructor.scope); > >- MethodBinding[] oldMethods = this.binding.methods(); // trigger sorting >+ MethodBinding[] oldMethods = sourceType.methods(); // trigger sorting > MethodBinding[] newMethods; >- System.arraycopy( >- this.binding.methods(), >- 0, >- newMethods = new MethodBinding[oldMethods.length + 1], >- 1, >- oldMethods.length); >- newMethods[0] = constructor.binding; // position 0 is important, since if sorted, constructor will still be ahead >- this.binding.setMethods(newMethods); >+ System.arraycopy(oldMethods, 0, newMethods = new MethodBinding[oldMethods.length + 1], 1, oldMethods.length); >+ newMethods[0] = constructor.binding; >+ sourceType.tagBits &= ~(TagBits.AreMethodsComplete|TagBits.AreMethodsSorted); // still need to resort, since could be valid methods ahead (140643) >+ sourceType.setMethods(newMethods); > //=================================================== > > return constructor.binding;
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 140643
:
40693
|
40932
|
40964