### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core 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.45 diff -u -r1.45 Clinit.java --- compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java 23 Aug 2006 16:32:56 -0000 1.45 +++ compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java 15 Sep 2006 03:04:37 -0000 @@ -148,8 +148,8 @@ if (this.assertionSyntheticFieldBinding != null) { // generate code related to the activation of assertion for this class codeStream.generateClassLiteralAccessForType( - classScope.enclosingSourceType(), - classLiteralSyntheticField); + classScope.outerMostClassScope().enclosingSourceType(), + this.classLiteralSyntheticField); codeStream.invokeJavaLangClassDesiredAssertionStatus(); BranchLabel falseLabel = new BranchLabel(codeStream); codeStream.ifne(falseLabel); @@ -311,9 +311,9 @@ this.assertionSyntheticFieldBinding = assertionSyntheticFieldBinding; // we need to add the field right now, because the field infos are generated before the methods - SourceTypeBinding sourceType = - this.scope.outerMostMethodScope().enclosingSourceType(); if (needClassLiteralField) { + SourceTypeBinding sourceType = + this.scope.outerMostMethodScope().enclosingSourceType(); this.classLiteralSyntheticField = sourceType.addSyntheticFieldForClassLiteral(sourceType, scope); }