EA-53937: Drop failing assertion about no-name val in annotation

This commit is contained in:
Denis Zharkov
2015-06-02 13:40:09 +03:00
parent 0e718fbaab
commit 8da3f53404
4 changed files with 18 additions and 1 deletions
@@ -170,7 +170,7 @@ public class PropertyCodegen {
public void generateConstructorPropertyAsMethodForAnnotationClass(JetParameter p, PropertyDescriptor descriptor) {
JvmMethodSignature signature = typeMapper.mapAnnotationParameterSignature(descriptor);
String name = p.getName();
assert name != null : "Annotation parameter has no name: " + p.getText();
if (name == null) return;
MethodVisitor mv = v.newMethod(
OtherOrigin(p, descriptor), ACC_PUBLIC | ACC_ABSTRACT, name,
signature.getAsmMethod().getDescriptor(),
@@ -0,0 +1 @@
annotation class Ann(val x: Int, val<!SYNTAX!><!> )
@@ -0,0 +1,10 @@
package
internal final annotation class Ann : kotlin.Annotation {
public constructor Ann(/*0*/ x: kotlin.Int, /*1*/ <no name provided>: [ERROR : Type annotation was missing for parameter <no name provided>])
internal final val <no name provided>: [ERROR : Annotation is absent]
internal final val x: kotlin.Int
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -765,6 +765,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("noNameProperty.kt")
public void testNoNameProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/noNameProperty.kt");
doTest(fileName);
}
@TestMetadata("NonAnnotationClass.kt")
public void testNonAnnotationClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/NonAnnotationClass.kt");