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 53523 Details for
Bug 163600
[compiler] Internal references to static inner classes fail in presence of assert keyword
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_163600_32x.txt (text/plain), 4.16 KB, created by
Olivier Thomann
on 2006-11-08 19:45:46 EST
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2006-11-08 19:45:46 EST
Size:
4.16 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/ast/ClassLiteralAccess.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ClassLiteralAccess.java,v >retrieving revision 1.41 >diff -u -r1.41 ClassLiteralAccess.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ClassLiteralAccess.java 28 Mar 2006 20:29:57 -0000 1.41 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ClassLiteralAccess.java 9 Nov 2006 00:48:17 -0000 >@@ -36,11 +36,10 @@ > FlowInfo flowInfo) { > > // if reachable, request the addition of a synthetic field for caching the class descriptor >- SourceTypeBinding sourceType = >- currentScope.outerMostMethodScope().enclosingSourceType(); >- if ((!(sourceType.isInterface() >- // no field generated in interface case (would'nt verify) see 1FHHEZL >- || sourceType.isBaseType())) >+ SourceTypeBinding sourceType = currentScope.outerMostClassScope().enclosingSourceType(); >+ // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=22334 >+ if (!sourceType.isInterface() >+ && !sourceType.isBaseType() > && currentScope.compilerOptions().sourceLevel < ClassFileConstants.JDK1_5) { > syntheticField = sourceType.addSyntheticFieldForClassLiteral(targetType, currentScope); > } >Index: compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java,v >retrieving revision 1.44.4.2 >diff -u -r1.44.4.2 Clinit.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java 15 Sep 2006 11:11:22 -0000 1.44.4.2 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java 9 Nov 2006 00:48:17 -0000 >@@ -10,12 +10,24 @@ > *******************************************************************************/ > package org.eclipse.jdt.internal.compiler.ast; > >-import org.eclipse.jdt.internal.compiler.*; >-import org.eclipse.jdt.internal.compiler.codegen.*; >-import org.eclipse.jdt.internal.compiler.flow.*; >-import org.eclipse.jdt.internal.compiler.lookup.*; >-import org.eclipse.jdt.internal.compiler.parser.*; >-import org.eclipse.jdt.internal.compiler.problem.*; >+import org.eclipse.jdt.internal.compiler.ASTVisitor; >+import org.eclipse.jdt.internal.compiler.ClassFile; >+import org.eclipse.jdt.internal.compiler.CompilationResult; >+import org.eclipse.jdt.internal.compiler.codegen.BranchLabel; >+import org.eclipse.jdt.internal.compiler.codegen.CodeStream; >+import org.eclipse.jdt.internal.compiler.codegen.ConstantPool; >+import org.eclipse.jdt.internal.compiler.flow.ExceptionHandlingFlowContext; >+import org.eclipse.jdt.internal.compiler.flow.FlowInfo; >+import org.eclipse.jdt.internal.compiler.flow.InitializationFlowContext; >+import org.eclipse.jdt.internal.compiler.lookup.Binding; >+import org.eclipse.jdt.internal.compiler.lookup.BlockScope; >+import org.eclipse.jdt.internal.compiler.lookup.ClassScope; >+import org.eclipse.jdt.internal.compiler.lookup.FieldBinding; >+import org.eclipse.jdt.internal.compiler.lookup.MethodScope; >+import org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding; >+import org.eclipse.jdt.internal.compiler.lookup.TypeConstants; >+import org.eclipse.jdt.internal.compiler.parser.Parser; >+import org.eclipse.jdt.internal.compiler.problem.AbortMethod; > > public class Clinit extends AbstractMethodDeclaration { > >@@ -313,9 +325,11 @@ > // we need to add the field right now, because the field infos are generated before the methods > if (needClassLiteralField) { > SourceTypeBinding sourceType = >- this.scope.outerMostMethodScope().enclosingSourceType(); >- this.classLiteralSyntheticField = >- sourceType.addSyntheticFieldForClassLiteral(sourceType, scope); >+ this.scope.outerMostClassScope().enclosingSourceType(); >+ // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=22334 >+ if (!sourceType.isInterface() && !sourceType.isBaseType()) { >+ this.classLiteralSyntheticField = sourceType.addSyntheticFieldForClassLiteral(sourceType, scope); >+ } > } > } >
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 163600
:
53334
|
53385
|
53405
| 53523 |
53524