diff --git a/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithAnnotationInParam.java b/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithAnnotationInParam.java index 8d1a1c5c984..29eaa534727 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithAnnotationInParam.java +++ b/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithAnnotationInParam.java @@ -1,35 +1,38 @@ package test; -@interface MyAnnotationWithParam { - MyAnnotation value(); -} +public interface AnnotationWithAnnotationInParam { -@interface MyAnnotation { - String value(); -} + public @interface MyAnnotationWithParam { + MyAnnotation value(); + } -@MyAnnotationWithParam(@MyAnnotation("test")) -class A {} + public @interface MyAnnotation { + String value(); + } -@interface MyAnnotation2 { - String[] value(); -} + @MyAnnotationWithParam(@MyAnnotation("test")) + public class A {} -@interface MyAnnotationWithParam2 { - MyAnnotation2 value(); -} + public @interface MyAnnotation2 { + String[] value(); + } -@MyAnnotationWithParam2(@MyAnnotation2({"test", "test2"})) -class B {} + public @interface MyAnnotationWithParam2 { + MyAnnotation2 value(); + } -@interface MyAnnotation3 { - String first(); - String second(); -} + @MyAnnotationWithParam2(@MyAnnotation2({"test", "test2"})) + public class B {} -@interface MyAnnotationWithParam3 { - MyAnnotation3 value(); -} + public @interface MyAnnotation3 { + String first(); + String second(); + } -@MyAnnotationWithParam3(@MyAnnotation3(first = "f", second = "s")) -class C {} + public @interface MyAnnotationWithParam3 { + MyAnnotation3 value(); + } + + @MyAnnotationWithParam3(@MyAnnotation3(first = "f", second = "s")) + public class C {} +} \ No newline at end of file diff --git a/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithAnnotationInParam.txt b/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithAnnotationInParam.txt new file mode 100644 index 00000000000..7abf0b8b64e --- /dev/null +++ b/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithAnnotationInParam.txt @@ -0,0 +1,47 @@ +package test + +public trait AnnotationWithAnnotationInParam : java.lang.Object { + + test.AnnotationWithAnnotationInParam.MyAnnotationWithParam(value = MyAnnotation[value = "test"]: test.AnnotationWithAnnotationInParam.MyAnnotation) public open class A : java.lang.Object { + public constructor A() + } + + test.AnnotationWithAnnotationInParam.MyAnnotationWithParam2(value = MyAnnotation2[value = ["test", "test2"]]: test.AnnotationWithAnnotationInParam.MyAnnotation2) public open class B : java.lang.Object { + public constructor B() + } + + test.AnnotationWithAnnotationInParam.MyAnnotationWithParam3(value = MyAnnotation3[first = "f", second = "s"]: test.AnnotationWithAnnotationInParam.MyAnnotation3) public open class C : java.lang.Object { + public constructor C() + } + + public final annotation class MyAnnotation : jet.Annotation { + public constructor MyAnnotation(/*0*/ value : jet.String?) + public abstract fun value() : jet.String? + } + + public final annotation class MyAnnotation2 : jet.Annotation { + public constructor MyAnnotation2(/*0*/ vararg value : jet.String? /*jet.Array?*/) + public abstract fun value() : jet.Array? + } + + public final annotation class MyAnnotation3 : jet.Annotation { + public constructor MyAnnotation3(/*0*/ first : jet.String?, /*1*/ second : jet.String?) + public abstract fun first() : jet.String? + public abstract fun second() : jet.String? + } + + public final annotation class MyAnnotationWithParam : jet.Annotation { + public constructor MyAnnotationWithParam(/*0*/ value : test.AnnotationWithAnnotationInParam.MyAnnotation?) + public abstract fun value() : test.AnnotationWithAnnotationInParam.MyAnnotation? + } + + public final annotation class MyAnnotationWithParam2 : jet.Annotation { + public constructor MyAnnotationWithParam2(/*0*/ value : test.AnnotationWithAnnotationInParam.MyAnnotation2?) + public abstract fun value() : test.AnnotationWithAnnotationInParam.MyAnnotation2? + } + + public final annotation class MyAnnotationWithParam3 : jet.Annotation { + public constructor MyAnnotationWithParam3(/*0*/ value : test.AnnotationWithAnnotationInParam.MyAnnotation3?) + public abstract fun value() : test.AnnotationWithAnnotationInParam.MyAnnotation3? + } +} diff --git a/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithArrayOfEnumInParam.java b/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithArrayOfEnumInParam.java index af40752440a..86c996e0388 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithArrayOfEnumInParam.java +++ b/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithArrayOfEnumInParam.java @@ -3,7 +3,10 @@ package test; import java.lang.annotation.ElementType; import java.lang.annotation.Target; -@Target({ElementType.FIELD, ElementType.CONSTRUCTOR}) -@interface targetAnnotation { - String value(); +public interface AnnotationWithArrayOfEnumInParam { + + @Target({ElementType.FIELD, ElementType.CONSTRUCTOR}) + public @interface targetAnnotation { + String value(); + } } diff --git a/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithArrayOfEnumInParam.txt b/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithArrayOfEnumInParam.txt new file mode 100644 index 00000000000..792a5ad334d --- /dev/null +++ b/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithArrayOfEnumInParam.txt @@ -0,0 +1,9 @@ +package test + +public trait AnnotationWithArrayOfEnumInParam : java.lang.Object { + + java.lang.annotation.Target(value = [ElementType.FIELD, ElementType.CONSTRUCTOR]: jet.Array?) public final annotation class targetAnnotation : jet.Annotation { + public constructor targetAnnotation(/*0*/ value : jet.String?) + public abstract fun value() : jet.String? + } +} diff --git a/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithArrayOfStringInParam.java b/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithArrayOfStringInParam.java index 9223ffd344a..d86a0039181 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithArrayOfStringInParam.java +++ b/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithArrayOfStringInParam.java @@ -1,14 +1,16 @@ package test; -import java.lang.String; import java.lang.annotation.ElementType; import java.lang.annotation.Target; -@interface MyAnnotation { - String[] value(); -} +public interface AnnotationWithArrayOfStringInParam { -@MyAnnotation({"a", "b", "c"}) -class A { - + public @interface MyAnnotation { + String[] value(); + } + + @MyAnnotation({"a", "b", "c"}) + public class A { + + } } diff --git a/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithArrayOfStringInParam.txt b/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithArrayOfStringInParam.txt new file mode 100644 index 00000000000..487bd475048 --- /dev/null +++ b/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithArrayOfStringInParam.txt @@ -0,0 +1,13 @@ +package test + +public trait AnnotationWithArrayOfStringInParam : java.lang.Object { + + test.AnnotationWithArrayOfStringInParam.MyAnnotation(value = ["a", "b", "c"]: jet.Array?) public open class A : java.lang.Object { + public constructor A() + } + + public final annotation class MyAnnotation : jet.Annotation { + public constructor MyAnnotation(/*0*/ vararg value : jet.String? /*jet.Array?*/) + public abstract fun value() : jet.Array? + } +} diff --git a/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithEmptyArrayInParam.java b/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithEmptyArrayInParam.java index 2746f53cabe..02e6af57d60 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithEmptyArrayInParam.java +++ b/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithEmptyArrayInParam.java @@ -1,14 +1,16 @@ package test; -import java.lang.String; import java.lang.annotation.ElementType; import java.lang.annotation.Target; -@interface MyAnnotation { - String[] value(); -} +public interface AnnotationWithEmptyArrayInParam { -@MyAnnotation({}) -class A { - + public @interface MyAnnotation { + String[] value(); + } + + @MyAnnotation({}) + public class A { + + } } diff --git a/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithEmptyArrayInParam.txt b/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithEmptyArrayInParam.txt new file mode 100644 index 00000000000..230f6657e3f --- /dev/null +++ b/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithEmptyArrayInParam.txt @@ -0,0 +1,13 @@ +package test + +public trait AnnotationWithEmptyArrayInParam : java.lang.Object { + + test.AnnotationWithEmptyArrayInParam.MyAnnotation(value = []: jet.Array?) public open class A : java.lang.Object { + public constructor A() + } + + public final annotation class MyAnnotation : jet.Annotation { + public constructor MyAnnotation(/*0*/ vararg value : jet.String? /*jet.Array?*/) + public abstract fun value() : jet.Array? + } +} diff --git a/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithEnumInParam.java b/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithEnumInParam.java index b5552b4de55..85b0776e267 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithEnumInParam.java +++ b/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithEnumInParam.java @@ -3,7 +3,10 @@ package test; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; -@Retention(RetentionPolicy.RUNTIME) -@interface retentionAnnotation { - String value(); +public interface AnnotationWithEnumInParam { + + @Retention(RetentionPolicy.RUNTIME) + public @interface RetentionAnnotation { + String value(); + } } diff --git a/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithEnumInParam.txt b/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithEnumInParam.txt new file mode 100644 index 00000000000..ee23b28ed19 --- /dev/null +++ b/compiler/testData/loadJava/compiledJava/annotations/AnnotationWithEnumInParam.txt @@ -0,0 +1,9 @@ +package test + +public trait AnnotationWithEnumInParam : java.lang.Object { + + java.lang.annotation.Retention(value = RetentionPolicy.RUNTIME: java.lang.annotation.RetentionPolicy) public final annotation class RetentionAnnotation : jet.Annotation { + public constructor RetentionAnnotation(/*0*/ value : jet.String?) + public abstract fun value() : jet.String? + } +} diff --git a/compiler/testData/loadJava/compiledJava/annotations/CustomAnnotation.java b/compiler/testData/loadJava/compiledJava/annotations/CustomAnnotation.java index bdb82beb07b..c613d72291d 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/CustomAnnotation.java +++ b/compiler/testData/loadJava/compiledJava/annotations/CustomAnnotation.java @@ -1,12 +1,15 @@ package test; -@MyAnnotation(MyEnum.ONE) -class MyTest {} +public interface CustomAnnotation { -@interface MyAnnotation { - MyEnum value(); -} + @MyAnnotation(MyEnum.ONE) + public class MyTest {} -enum MyEnum { - ONE + public @interface MyAnnotation { + MyEnum value(); + } + + public enum MyEnum { + ONE + } } diff --git a/compiler/testData/loadJava/compiledJava/annotations/CustomAnnotation.txt b/compiler/testData/loadJava/compiledJava/annotations/CustomAnnotation.txt new file mode 100644 index 00000000000..dd91e4eac62 --- /dev/null +++ b/compiler/testData/loadJava/compiledJava/annotations/CustomAnnotation.txt @@ -0,0 +1,29 @@ +package test + +public trait CustomAnnotation : java.lang.Object { + + public final annotation class MyAnnotation : jet.Annotation { + public constructor MyAnnotation(/*0*/ value : test.CustomAnnotation.MyEnum?) + public abstract fun value() : test.CustomAnnotation.MyEnum? + } + + public final enum class MyEnum : jet.Enum { + private constructor MyEnum() + public final override /*1*/ /*fake_override*/ fun name() : jet.String + public final override /*1*/ /*fake_override*/ fun ordinal() : jet.Int + + public class object { + private constructor () + public final val ONE : test.CustomAnnotation.MyEnum + public final fun valueOf(/*0*/ value : jet.String) : test.CustomAnnotation.MyEnum + public final fun values() : jet.Array + } + } + + test.CustomAnnotation.MyAnnotation(value = MyEnum.ONE: test.CustomAnnotation.MyEnum) public open class MyTest : java.lang.Object { + public constructor MyTest() + } +} + +package CustomAnnotation { +} diff --git a/compiler/testData/loadJava/compiledJava/annotations/CustomAnnotationWithDefaultParameter.java b/compiler/testData/loadJava/compiledJava/annotations/CustomAnnotationWithDefaultParameter.java index b5b151fb012..7419181df87 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/CustomAnnotationWithDefaultParameter.java +++ b/compiler/testData/loadJava/compiledJava/annotations/CustomAnnotationWithDefaultParameter.java @@ -1,10 +1,12 @@ package test; -@MyAnnotation(first = "f", second = "s") -class MyTest {} +public interface CustomAnnotationWithDefaultParameter { -@interface MyAnnotation { - String first(); - String second() default("s"); + @MyAnnotation(first = "f", second = "s") + public class MyTest {} + + public @interface MyAnnotation { + String first(); + String second() default("s"); + } } - diff --git a/compiler/testData/loadJava/compiledJava/annotations/CustomAnnotationWithDefaultParameter.txt b/compiler/testData/loadJava/compiledJava/annotations/CustomAnnotationWithDefaultParameter.txt new file mode 100644 index 00000000000..ae2084aafcc --- /dev/null +++ b/compiler/testData/loadJava/compiledJava/annotations/CustomAnnotationWithDefaultParameter.txt @@ -0,0 +1,14 @@ +package test + +public trait CustomAnnotationWithDefaultParameter : java.lang.Object { + + public final annotation class MyAnnotation : jet.Annotation { + public constructor MyAnnotation(/*0*/ first : jet.String?, /*1*/ second : jet.String? = ...) + public abstract fun first() : jet.String? + public abstract fun second() : jet.String? + } + + test.CustomAnnotationWithDefaultParameter.MyAnnotation(first = "f": jet.String, second = "s": jet.String) public open class MyTest : java.lang.Object { + public constructor MyTest() + } +} diff --git a/compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation.java b/compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation.java index ecdcb1d5f5d..80118cc75ff 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation.java +++ b/compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation.java @@ -1,11 +1,14 @@ package test; -@B(@A("test")) -@interface A { - String value(); -} +public interface RecursiveAnnotation { -@B(@A("test")) -@interface B { - A value(); + @B(@A("test")) + public @interface A { + String value(); + } + + @B(@A("test")) + public @interface B { + A value(); + } } diff --git a/compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation.txt b/compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation.txt new file mode 100644 index 00000000000..4f06acffb22 --- /dev/null +++ b/compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation.txt @@ -0,0 +1,14 @@ +package test + +public trait RecursiveAnnotation : java.lang.Object { + + test.RecursiveAnnotation.B(value = A[value = "test"]: test.RecursiveAnnotation.A) public final annotation class A : jet.Annotation { + public constructor A(/*0*/ value : jet.String?) + public abstract fun value() : jet.String? + } + + test.RecursiveAnnotation.B(value = A[value = "test"]: test.RecursiveAnnotation.A) public final annotation class B : jet.Annotation { + public constructor B(/*0*/ value : test.RecursiveAnnotation.A?) + public abstract fun value() : test.RecursiveAnnotation.A? + } +} diff --git a/compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation2.java b/compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation2.java index 8d14dabe04a..70d30f52077 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation2.java +++ b/compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation2.java @@ -1,10 +1,13 @@ package test; -@interface A { - B value(); -} +public interface RecursiveAnnotation2 { -@A(@B("test")) -@interface B { - String value(); + public @interface A { + B value(); + } + + @A(@B("test")) + public @interface B { + String value(); + } } diff --git a/compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation2.txt b/compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation2.txt new file mode 100644 index 00000000000..0b32ccd8cf0 --- /dev/null +++ b/compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation2.txt @@ -0,0 +1,14 @@ +package test + +public trait RecursiveAnnotation2 : java.lang.Object { + + public final annotation class A : jet.Annotation { + public constructor A(/*0*/ value : test.RecursiveAnnotation2.B?) + public abstract fun value() : test.RecursiveAnnotation2.B? + } + + test.RecursiveAnnotation2.A(value = B[value = "test"]: test.RecursiveAnnotation2.B) public final annotation class B : jet.Annotation { + public constructor B(/*0*/ value : jet.String?) + public abstract fun value() : jet.String? + } +}