Lines 10-21
Link Here
|
10 |
*******************************************************************************/ |
10 |
*******************************************************************************/ |
11 |
package org.eclipse.jdt.internal.compiler.ast; |
11 |
package org.eclipse.jdt.internal.compiler.ast; |
12 |
|
12 |
|
13 |
import org.eclipse.jdt.internal.compiler.*; |
13 |
import org.eclipse.jdt.internal.compiler.ASTVisitor; |
14 |
import org.eclipse.jdt.internal.compiler.codegen.*; |
14 |
import org.eclipse.jdt.internal.compiler.ClassFile; |
15 |
import org.eclipse.jdt.internal.compiler.flow.*; |
15 |
import org.eclipse.jdt.internal.compiler.CompilationResult; |
16 |
import org.eclipse.jdt.internal.compiler.lookup.*; |
16 |
import org.eclipse.jdt.internal.compiler.codegen.BranchLabel; |
17 |
import org.eclipse.jdt.internal.compiler.parser.*; |
17 |
import org.eclipse.jdt.internal.compiler.codegen.CodeStream; |
18 |
import org.eclipse.jdt.internal.compiler.problem.*; |
18 |
import org.eclipse.jdt.internal.compiler.codegen.ConstantPool; |
|
|
19 |
import org.eclipse.jdt.internal.compiler.flow.ExceptionHandlingFlowContext; |
20 |
import org.eclipse.jdt.internal.compiler.flow.FlowInfo; |
21 |
import org.eclipse.jdt.internal.compiler.flow.InitializationFlowContext; |
22 |
import org.eclipse.jdt.internal.compiler.lookup.Binding; |
23 |
import org.eclipse.jdt.internal.compiler.lookup.BlockScope; |
24 |
import org.eclipse.jdt.internal.compiler.lookup.ClassScope; |
25 |
import org.eclipse.jdt.internal.compiler.lookup.FieldBinding; |
26 |
import org.eclipse.jdt.internal.compiler.lookup.MethodScope; |
27 |
import org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding; |
28 |
import org.eclipse.jdt.internal.compiler.lookup.TypeConstants; |
29 |
import org.eclipse.jdt.internal.compiler.parser.Parser; |
30 |
import org.eclipse.jdt.internal.compiler.problem.AbortMethod; |
19 |
|
31 |
|
20 |
public class Clinit extends AbstractMethodDeclaration { |
32 |
public class Clinit extends AbstractMethodDeclaration { |
21 |
|
33 |
|
Lines 313-321
Link Here
|
313 |
// we need to add the field right now, because the field infos are generated before the methods |
325 |
// we need to add the field right now, because the field infos are generated before the methods |
314 |
if (needClassLiteralField) { |
326 |
if (needClassLiteralField) { |
315 |
SourceTypeBinding sourceType = |
327 |
SourceTypeBinding sourceType = |
316 |
this.scope.outerMostMethodScope().enclosingSourceType(); |
328 |
this.scope.outerMostClassScope().enclosingSourceType(); |
317 |
this.classLiteralSyntheticField = |
329 |
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=22334 |
318 |
sourceType.addSyntheticFieldForClassLiteral(sourceType, scope); |
330 |
if (!sourceType.isInterface() && !sourceType.isBaseType()) { |
|
|
331 |
this.classLiteralSyntheticField = sourceType.addSyntheticFieldForClassLiteral(sourceType, scope); |
332 |
} |
319 |
} |
333 |
} |
320 |
} |
334 |
} |
321 |
|
335 |
|