Test for the case when annotation arguments contain null in Java

This is an error in Java, but it may be present in the source by mistake
This commit is contained in:
Andrey Breslav
2014-01-17 13:13:50 +04:00
parent 8f56283771
commit 314b1e371b
3 changed files with 29 additions and 0 deletions
@@ -0,0 +1,11 @@
package test;
public interface NullInAnnotation {
@interface Ann {
String a();
String[] b();
}
@Ann(a = null, b = {null})
void foo();
}
@@ -0,0 +1,13 @@
package test
public /*synthesized*/ fun NullInAnnotation(/*0*/ function: () -> jet.Unit): test.NullInAnnotation
public trait NullInAnnotation : java.lang.Object {
test.NullInAnnotation.Ann(a = null: jet.Nothing?, b = {null}: jet.Array<jet.String>) public abstract fun foo(): jet.Unit
public final annotation class Ann : jet.Annotation {
public constructor Ann(/*0*/ a: jet.String, /*1*/ vararg b: jet.String /*jet.Array<jet.String>*/)
public abstract fun a(): jet.String
public abstract fun b(): jet.Array<jet.String>
}
}