View | Details | Raw Unified | Return to bug 343713 | Differences between
and this patch

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java (+1 lines)
Lines 335-340 Link Here
335
335
336
		if (needFieldInitializations && preInitSyntheticFields){
336
		if (needFieldInitializations && preInitSyntheticFields){
337
			generateSyntheticFieldInitializationsIfNecessary(this.scope, codeStream, declaringClass);
337
			generateSyntheticFieldInitializationsIfNecessary(this.scope, codeStream, declaringClass);
338
			codeStream.recordPositionsFrom(0, this.bodyStart);
338
		}
339
		}
339
		// generate constructor call
340
		// generate constructor call
340
		if (this.constructorCall != null) {
341
		if (this.constructorCall != null) {
(-)src/org/eclipse/jdt/core/tests/compiler/regression/InnerEmulationTest_1_5.java (-1 / +34 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2009 IBM Corporation and others.
2
 * Copyright (c) 2009, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 286-291 Link Here
286
		"     inner name: #24 D, accessflags: 8 static]\n";
286
		"     inner name: #24 D, accessflags: 8 static]\n";
287
	checkDisassembledClassFile(OUTPUT_DIR + File.separator + "p" + File.separator + "X.class", "X", expectedOutput);
287
	checkDisassembledClassFile(OUTPUT_DIR + File.separator + "p" + File.separator + "X.class", "X", expectedOutput);
288
}
288
}
289
public void test14() throws Exception {
290
	runConformTest(new String[] {
291
		"LineNumberBug.java",
292
		"public class LineNumberBug {\n" + 
293
		"    class Inner {\n" + 
294
		"		public Inner() {\n" + 
295
		"			System.out.println(\"Inner()\");\n" + 
296
		"		}\n" + 
297
		"    }\n" + 
298
		"	public static void main(String[] args) {\n" + 
299
		"		new LineNumberBug().new Inner();\n" + 
300
		"	}\n" + 
301
		"}\n"
302
	});
303
	String expectedOutput =
304
		"  // Method descriptor #8 (LLineNumberBug;)V\n" + 
305
		"  // Stack: 2, Locals: 2\n" + 
306
		"  public LineNumberBug$Inner(LineNumberBug arg0);\n" + 
307
		"     0  aload_0 [this]\n" + 
308
		"     1  aload_1 [arg0]\n" + 
309
		"     2  putfield LineNumberBug$Inner.this$0 : LineNumberBug [10]\n" + 
310
		"     5  aload_0 [this]\n" + 
311
		"     6  invokespecial java.lang.Object() [12]\n" + 
312
		"     9  getstatic java.lang.System.out : java.io.PrintStream [15]\n" + 
313
		"    12  ldc <String \"Inner()\"> [21]\n" + 
314
		"    14  invokevirtual java.io.PrintStream.println(java.lang.String) : void [23]\n" + 
315
		"    17  return\n" + 
316
		"      Line numbers:\n" + 
317
		"        [pc: 0, line: 3]\n" + 
318
		"        [pc: 9, line: 4]\n" +
319
		"        [pc: 17, line: 5]\n";
320
	checkDisassembledClassFile(OUTPUT_DIR + File.separator + "LineNumberBug$Inner.class", "LineNumberBug$Inner", expectedOutput);	
321
}
289
public static Class testClass() {
322
public static Class testClass() {
290
	return InnerEmulationTest_1_5.class;
323
	return InnerEmulationTest_1_5.class;
291
}
324
}

Return to bug 343713