|
Lines 15-20
Link Here
|
| 15 |
* Bug 415541 - [1.8][compiler] Type annotations in the body of static initializer get dropped |
15 |
* Bug 415541 - [1.8][compiler] Type annotations in the body of static initializer get dropped |
| 16 |
* Bug 415543 - [1.8][compiler] Incorrect bound index in RuntimeInvisibleTypeAnnotations attribute |
16 |
* Bug 415543 - [1.8][compiler] Incorrect bound index in RuntimeInvisibleTypeAnnotations attribute |
| 17 |
* Bug 415397 - [1.8][compiler] Type Annotations on wildcard type argument dropped |
17 |
* Bug 415397 - [1.8][compiler] Type Annotations on wildcard type argument dropped |
|
|
18 |
* Bug 415399 - [1.8][compiler] Type annotations on constructor results dropped by the code generator |
| 18 |
*******************************************************************************/ |
19 |
*******************************************************************************/ |
| 19 |
package org.eclipse.jdt.core.tests.compiler.regression; |
20 |
package org.eclipse.jdt.core.tests.compiler.regression; |
| 20 |
|
21 |
|
|
Lines 662-668
public class JSR308SpecSnippetTests extends AbstractRegressionTest {
Link Here
|
| 662 |
" )\n"; |
663 |
" )\n"; |
| 663 |
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM); |
664 |
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM); |
| 664 |
} |
665 |
} |
| 665 |
public void test013() throws Exception { // WILL FAIL WHEN https://bugs.eclipse.org/bugs/show_bug.cgi?id=415399 IS FIXED. |
666 |
public void test013() throws Exception { |
| 666 |
this.runConformTest( |
667 |
this.runConformTest( |
| 667 |
new String[] { |
668 |
new String[] { |
| 668 |
"X.java", |
669 |
"X.java", |
|
Lines 677-683
public class JSR308SpecSnippetTests extends AbstractRegressionTest {
Link Here
|
| 677 |
"}\n", |
678 |
"}\n", |
| 678 |
}, |
679 |
}, |
| 679 |
""); |
680 |
""); |
|
|
681 |
// javac b100 gives: |
| 682 |
// RuntimeInvisibleTypeAnnotations: |
| 683 |
// 0: #9(): METHOD_RETURN |
| 680 |
String expectedOutput = |
684 |
String expectedOutput = |
|
|
685 |
"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + |
| 681 |
"class X {\n" + |
686 |
"class X {\n" + |
| 682 |
" Constant pool:\n" + |
687 |
" Constant pool:\n" + |
| 683 |
" constant #1 class: #2 X\n" + |
688 |
" constant #1 class: #2 X\n" + |
|
Lines 693-700
public class JSR308SpecSnippetTests extends AbstractRegressionTest {
Link Here
|
| 693 |
" constant #11 utf8: \"LocalVariableTable\"\n" + |
698 |
" constant #11 utf8: \"LocalVariableTable\"\n" + |
| 694 |
" constant #12 utf8: \"this\"\n" + |
699 |
" constant #12 utf8: \"this\"\n" + |
| 695 |
" constant #13 utf8: \"LX;\"\n" + |
700 |
" constant #13 utf8: \"LX;\"\n" + |
| 696 |
" constant #14 utf8: \"SourceFile\"\n" + |
701 |
" constant #14 utf8: \"RuntimeInvisibleTypeAnnotations\"\n" + |
| 697 |
" constant #15 utf8: \"X.java\"\n" + |
702 |
" constant #15 utf8: \"LImmutable;\"\n" + |
|
|
703 |
" constant #16 utf8: \"SourceFile\"\n" + |
| 704 |
" constant #17 utf8: \"X.java\"\n" + |
| 698 |
" \n" + |
705 |
" \n" + |
| 699 |
" // Method descriptor #6 ()V\n" + |
706 |
" // Method descriptor #6 ()V\n" + |
| 700 |
" // Stack: 1, Locals: 1\n" + |
707 |
" // Stack: 1, Locals: 1\n" + |
|
Lines 707-712
public class JSR308SpecSnippetTests extends AbstractRegressionTest {
Link Here
|
| 707 |
" [pc: 4, line: 8]\n" + |
714 |
" [pc: 4, line: 8]\n" + |
| 708 |
" Local variable table:\n" + |
715 |
" Local variable table:\n" + |
| 709 |
" [pc: 0, pc: 5] local: this index: 0 type: X\n" + |
716 |
" [pc: 0, pc: 5] local: this index: 0 type: X\n" + |
|
|
717 |
" RuntimeInvisibleTypeAnnotations: \n" + |
| 718 |
" #15 @Immutable(\n" + |
| 719 |
" target type = 0x14 METHOD_RETURN\n" + |
| 720 |
" )\n" + |
| 710 |
"}"; |
721 |
"}"; |
| 711 |
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM); |
722 |
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM); |
| 712 |
} |
723 |
} |