|
Lines 17-22
Link Here
|
| 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 |
* Bug 415399 - [1.8][compiler] Type annotations on constructor results dropped by the code generator |
| 19 |
* Bug 415470 - [1.8][compiler] Type annotations on class declaration go vanishing |
19 |
* Bug 415470 - [1.8][compiler] Type annotations on class declaration go vanishing |
|
|
20 |
* Bug 414384 - [1.8] type annotation on abbreviated inner class is not marked as inner type |
| 20 |
*******************************************************************************/ |
21 |
*******************************************************************************/ |
| 21 |
package org.eclipse.jdt.core.tests.compiler.regression; |
22 |
package org.eclipse.jdt.core.tests.compiler.regression; |
| 22 |
|
23 |
|
|
Lines 2071-2074
public class JSR308SpecSnippetTests extends AbstractRegressionTest {
Link Here
|
| 2071 |
"}"; |
2072 |
"}"; |
| 2072 |
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM); |
2073 |
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM); |
| 2073 |
} |
2074 |
} |
|
|
2075 |
|
| 2076 |
// Bug 414384 - [1.8] type annotation on abbreviated inner class is not marked as inner type |
| 2077 |
public void test035() throws Exception { |
| 2078 |
this.runConformTest( |
| 2079 |
new String[] { |
| 2080 |
"pkg/Clazz.java", |
| 2081 |
"package pkg;\n" + |
| 2082 |
"import java.lang.annotation.*;\n" + |
| 2083 |
"import static java.lang.annotation.ElementType.*;\n" + |
| 2084 |
"\n" + |
| 2085 |
"@Target({TYPE_USE}) @interface P { }\n" + |
| 2086 |
"@Target({TYPE_USE}) @interface O { }\n" + |
| 2087 |
"@Target({TYPE_USE}) @interface I { }\n" + |
| 2088 |
"\n" + |
| 2089 |
"public abstract class Clazz {\n" + |
| 2090 |
" public class Inner {}\n" + |
| 2091 |
" public abstract void n1(@I Inner i1);\n" + |
| 2092 |
" public abstract void n2(@O Clazz.@I Inner i2);\n" + |
| 2093 |
" public abstract void n3(pkg.@O Clazz.@I Inner i3);\n" + |
| 2094 |
"}\n", |
| 2095 |
}, |
| 2096 |
""); |
| 2097 |
// javac b100 produces for the methods: |
| 2098 |
// public abstract void n1(pkg.Clazz$Inner); |
| 2099 |
// RuntimeInvisibleTypeAnnotations: |
| 2100 |
// 0: #14(): METHOD_FORMAL_PARAMETER, param_index=0, location=[INNER_TYPE] |
| 2101 |
// |
| 2102 |
// public abstract void n2(pkg.Clazz$Inner); |
| 2103 |
// RuntimeInvisibleTypeAnnotations: |
| 2104 |
// 0: #14(): METHOD_FORMAL_PARAMETER, param_index=0, location=[INNER_TYPE] |
| 2105 |
// 1: #16(): METHOD_FORMAL_PARAMETER, param_index=0 |
| 2106 |
// |
| 2107 |
// public abstract void n3(pkg.Clazz$Inner); |
| 2108 |
// RuntimeInvisibleTypeAnnotations: |
| 2109 |
// 0: #14(): METHOD_FORMAL_PARAMETER, param_index=0, location=[INNER_TYPE] |
| 2110 |
// 1: #16(): METHOD_FORMAL_PARAMETER, param_index=0 |
| 2111 |
String expectedOutput = |
| 2112 |
" // Method descriptor #15 (Lpkg/Clazz$Inner;)V\n" + |
| 2113 |
" public abstract void n1(pkg.Clazz.Inner arg0);\n" + |
| 2114 |
" RuntimeInvisibleTypeAnnotations: \n" + |
| 2115 |
" #17 @pkg.I(\n" + |
| 2116 |
" target type = 0x16 METHOD_FORMAL_PARAMETER\n" + |
| 2117 |
" method parameter index = 0\n" + |
| 2118 |
" location = [INNER_TYPE]\n" + |
| 2119 |
" )\n" + |
| 2120 |
" \n" + |
| 2121 |
|
| 2122 |
" // Method descriptor #15 (Lpkg/Clazz$Inner;)V\n" + |
| 2123 |
" public abstract void n2(pkg.Clazz.Inner arg0);\n" + |
| 2124 |
" RuntimeInvisibleTypeAnnotations: \n" + |
| 2125 |
" #19 @pkg.O(\n" + |
| 2126 |
" target type = 0x16 METHOD_FORMAL_PARAMETER\n" + |
| 2127 |
" method parameter index = 0\n" + |
| 2128 |
" )\n" + |
| 2129 |
" #17 @pkg.I(\n" + |
| 2130 |
" target type = 0x16 METHOD_FORMAL_PARAMETER\n" + |
| 2131 |
" method parameter index = 0\n" + |
| 2132 |
" location = [INNER_TYPE]\n" + |
| 2133 |
" )\n" + |
| 2134 |
" \n" + |
| 2135 |
|
| 2136 |
" // Method descriptor #15 (Lpkg/Clazz$Inner;)V\n" + |
| 2137 |
" public abstract void n3(pkg.Clazz.Inner arg0);\n" + |
| 2138 |
" RuntimeInvisibleTypeAnnotations: \n" + |
| 2139 |
" #19 @pkg.O(\n" + |
| 2140 |
" target type = 0x16 METHOD_FORMAL_PARAMETER\n" + |
| 2141 |
" method parameter index = 0\n" + |
| 2142 |
" )\n" + |
| 2143 |
" #17 @pkg.I(\n" + |
| 2144 |
" target type = 0x16 METHOD_FORMAL_PARAMETER\n" + |
| 2145 |
" method parameter index = 0\n" + |
| 2146 |
" location = [INNER_TYPE]\n" + |
| 2147 |
" )\n" + |
| 2148 |
"\n" + |
| 2149 |
" Inner classes:\n" + |
| 2150 |
" [inner class info: #24 pkg/Clazz$Inner, outer class info: #1 pkg/Clazz\n" + |
| 2151 |
" inner name: #26 Inner, accessflags: 1 public]\n" + |
| 2152 |
"}"; |
| 2153 |
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "pkg" + File.separator + "Clazz.class", "pkg.Clazz", expectedOutput, ClassFileBytesDisassembler.SYSTEM); |
| 2154 |
} |
| 2155 |
|
| 2156 |
|
| 2074 |
} |
2157 |
} |