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 38901 Details for
Bug 136972
[reconciler] Error in static init blok with inner classes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch002.txt (text/plain), 2.76 KB, created by
David Audel
on 2006-04-19 03:54:04 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
David Audel
Created:
2006-04-19 03:54:04 EDT
Size:
2.76 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java,v >retrieving revision 1.92 >diff -u -r1.92 ASTConverterTestAST3_2.java >--- src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java 18 Apr 2006 14:11:34 -0000 1.92 >+++ src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java 19 Apr 2006 07:41:57 -0000 >@@ -7735,4 +7735,33 @@ > workingCopy.discardWorkingCopy(); > } > } >+ >+ /** >+ * http://dev.eclipse.org/bugs/show_bug.cgi?id=136972 >+ */ >+ public void test0646() throws JavaModelException { >+ ICompilationUnit workingCopy = null; >+ try { >+ String contents = >+ "public class X {\n" + >+ " static {\n" + >+ " class A\n" + >+ " Object o = new Object(){\n" + >+ " void test(){\n" + >+ " }\n" + >+ " };\n" + >+ " }\n" + >+ "}"; >+ workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/); >+ ASTNode node = buildAST( >+ contents, >+ workingCopy, >+ false, >+ true); >+ assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); >+ } finally { >+ if (workingCopy != null) >+ workingCopy.discardWorkingCopy(); >+ } >+ } > } >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredField.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredField.java,v >retrieving revision 1.33 >diff -u -r1.33 RecoveredField.java >--- compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredField.java 29 Mar 2006 02:47:34 -0000 1.33 >+++ compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredField.java 19 Apr 2006 07:42:00 -0000 >@@ -121,7 +121,13 @@ > typeDeclaration.bodyEnd = this.fieldDeclaration.declarationSourceEnd; > } > if (recoveredType.preserveContent){ >- fieldDeclaration.initialization = recoveredType.updatedTypeDeclaration().allocation; >+ TypeDeclaration anonymousType = recoveredType.updatedTypeDeclaration(); >+ fieldDeclaration.initialization = anonymousType.allocation; >+ if(this.fieldDeclaration.declarationSourceEnd == 0) { >+ int end = anonymousType.declarationSourceEnd; >+ this.fieldDeclaration.declarationSourceEnd = end; >+ this.fieldDeclaration.declarationEnd = end; >+ } > } > } > if (this.anonymousTypeCount > 0) fieldDeclaration.bits |= ASTNode.HasLocalType;
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 136972
:
38752
| 38901