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

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/ClassFile.java (+2 lines)
Lines 3856-3861 Link Here
3856
		}
3856
		}
3857
		if (aType.isAnonymousType()) {
3857
		if (aType.isAnonymousType()) {
3858
			accessFlags &= ~ClassFileConstants.AccFinal;
3858
			accessFlags &= ~ClassFileConstants.AccFinal;
3859
		} else if ((accessFlags & (ClassFileConstants.AccFinal | ClassFileConstants.AccAbstract)) == (ClassFileConstants.AccFinal | ClassFileConstants.AccAbstract)) {
3860
			accessFlags &= ~ClassFileConstants.AccFinal;
3859
		}
3861
		}
3860
		this.enclosingClassFile = parentClassFile;
3862
		this.enclosingClassFile = parentClassFile;
3861
		// innerclasses get their names computed at code gen time
3863
		// innerclasses get their names computed at code gen time
(-)src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java (-1 / +47 lines)
Lines 31-37 Link Here
31
// All specified tests which does not belong to the class are skipped...
31
// All specified tests which does not belong to the class are skipped...
32
static {
32
static {
33
//		TESTS_NAMES = new String[] { "test127" };
33
//		TESTS_NAMES = new String[] { "test127" };
34
//		TESTS_NUMBERS = new int[] { 104 };
34
//		TESTS_NUMBERS = new int[] { 107 };
35
//		TESTS_RANGE = new int[] { 169, 180 };
35
//		TESTS_RANGE = new int[] { 169, 180 };
36
}
36
}
37
37
Lines 5339-5342 Link Here
5339
		"Listener cannot be resolved to a type\n" + 
5339
		"Listener cannot be resolved to a type\n" + 
5340
		"----------\n");
5340
		"----------\n");
5341
}
5341
}
5342
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=319425
5343
public void test107() {
5344
	this.runNegativeTest(
5345
		new String[] {
5346
			"p/OuterBogus.java", //-----------------------------------------------------------------------
5347
			"package p;\n" +
5348
			"abstract final class OuterBogus {\n" + 
5349
			"	public static void call() {\n" + 
5350
			"		System.out.println(\"Hi. I'm outer bogus.\");\n" + 
5351
			"	}\n" + 
5352
			"}",
5353
		},
5354
		"----------\n" + 
5355
		"1. ERROR in p\\OuterBogus.java (at line 2)\n" + 
5356
		"	abstract final class OuterBogus {\n" + 
5357
		"	                     ^^^^^^^^^^\n" + 
5358
		"The class OuterBogus can be either abstract or final, not both\n" + 
5359
		"----------\n",
5360
		null /* no extra class libraries */,
5361
		true /* flush output directory */,
5362
		null /* no custom options */,
5363
		true /* do not generate output */,
5364
		false /* do not show category */,
5365
		false /* do not show warning token */,
5366
		false  /* do not skip javac for this peculiar test */,
5367
		false  /* do not perform statements recovery */);
5368
	this.runConformTest(
5369
		new String[] {
5370
			"p/Bogus.java", //-----------------------------------------------------------------------
5371
			"package p;\n" +
5372
			"\n" + 
5373
			"public class Bogus {\n" + 
5374
			"	public static void main(String[] args) {\n" + 
5375
			"		try {\n" +
5376
			"			OuterBogus.call();\n" + 
5377
			"		} catch(Error e) {\n" +
5378
			"			System.out.println(\"Compilation error found\");\n" + 
5379
			"		}\n" +
5380
			"	}\n" + 
5381
			"}",
5382
		},
5383
		"Compilation error found",
5384
		null,
5385
		false,
5386
		null);
5387
}
5342
}
5388
}

Return to bug 319425