Annotation target checking in front-end, a set of tests for different annotation targets, existing test fixes
No checks for erroneous annotations. Additional checks for identifiers.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
// Result type can be annotated
|
||||
target(AnnotationTarget.TYPE)
|
||||
annotation class My(val x: Int)
|
||||
|
||||
fun foo(): @My(42) Int = 24
|
||||
@@ -2,7 +2,7 @@ package
|
||||
|
||||
internal fun foo(): @[My(x = IntegerValueType(42))] kotlin.Int
|
||||
|
||||
kotlin.annotation.annotation() internal final annotation class My : kotlin.Annotation {
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.TYPE}) kotlin.annotation.annotation() internal final annotation class My : kotlin.Annotation {
|
||||
public constructor My(/*0*/ x: kotlin.Int)
|
||||
internal final val x: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
+1
@@ -1,2 +1,3 @@
|
||||
// Class constructor parameter type CAN be recursively annotated
|
||||
target(AnnotationTarget.TYPE)
|
||||
annotation class RecursivelyAnnotated(val x: @RecursivelyAnnotated(1) Int)
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package
|
||||
|
||||
kotlin.annotation.annotation() internal final annotation class RecursivelyAnnotated : kotlin.Annotation {
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.TYPE}) kotlin.annotation.annotation() internal final annotation class RecursivelyAnnotated : kotlin.Annotation {
|
||||
public constructor RecursivelyAnnotated(/*0*/ x: @[RecursivelyAnnotated(x = IntegerValueType(1))] kotlin.Int)
|
||||
internal final val x: @[RecursivelyAnnotated(x = IntegerValueType(1))] kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
@@ -8,8 +8,8 @@ annotation object O {}
|
||||
|
||||
annotation interface T {}
|
||||
|
||||
annotation fun f() = 0
|
||||
<!WRONG_ANNOTATION_TARGET!>annotation<!> fun f() = 0
|
||||
|
||||
annotation val x = 0
|
||||
<!WRONG_ANNOTATION_TARGET!>annotation<!> val x = 0
|
||||
|
||||
annotation var y = 0
|
||||
<!WRONG_ANNOTATION_TARGET!>annotation<!> var y = 0
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
annotation class Ann(val x: Int = 1)
|
||||
target(AnnotationTarget.EXPRESSION)
|
||||
annotation(repeatable = true) class Ann(val x: Int = 1)
|
||||
|
||||
inline fun bar(block: () -> Int): Int = block()
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package
|
||||
kotlin.inline() internal fun bar(/*0*/ block: () -> kotlin.Int): kotlin.Int
|
||||
internal fun foo(): kotlin.Unit
|
||||
|
||||
kotlin.annotation.annotation() internal final annotation class Ann : kotlin.Annotation {
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.EXPRESSION}) kotlin.annotation.annotation(repeatable = true) internal final annotation class Ann : kotlin.Annotation {
|
||||
public constructor Ann(/*0*/ x: kotlin.Int = ...)
|
||||
internal final val x: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
annotation class Ann(val x: Int = 6)
|
||||
target(AnnotationTarget.TYPE, AnnotationTarget.CLASSIFIER,
|
||||
AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION,
|
||||
AnnotationTarget.EXPRESSION, AnnotationTarget.PROPERTY)
|
||||
annotation(repeatable = true) class Ann(val x: Int = 6)
|
||||
|
||||
@Ann(1) @Ann(2) @Ann(3) @private class A @Ann constructor() {
|
||||
@Ann(x = 5) fun foo() {
|
||||
|
||||
@@ -10,7 +10,7 @@ Ann(x = IntegerValueType(1)) Ann(x = IntegerValueType(2)) Ann(x = IntegerValueTy
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
kotlin.annotation.annotation() internal final annotation class Ann : kotlin.Annotation {
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.TYPE, AnnotationTarget.CLASSIFIER, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.EXPRESSION, AnnotationTarget.PROPERTY}) kotlin.annotation.annotation(repeatable = true) internal final annotation class Ann : kotlin.Annotation {
|
||||
public constructor Ann(/*0*/ x: kotlin.Int = ...)
|
||||
internal final val x: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
target(AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.EXPRESSION)
|
||||
annotation class test
|
||||
|
||||
fun foo(test <!UNUSED_PARAMETER!>f<!> : Int) {}
|
||||
|
||||
@@ -11,7 +11,7 @@ internal final class Hello {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
kotlin.annotation.annotation() internal final annotation class test : kotlin.Annotation {
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.EXPRESSION}) kotlin.annotation.annotation() internal final annotation class test : kotlin.Annotation {
|
||||
public constructor test()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
fun foo() = @ann 1
|
||||
|
||||
target(AnnotationTarget.EXPRESSION)
|
||||
annotation class ann
|
||||
@@ -2,7 +2,7 @@ package
|
||||
|
||||
internal fun foo(): kotlin.Int
|
||||
|
||||
kotlin.annotation.annotation() internal final annotation class ann : kotlin.Annotation {
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.EXPRESSION}) kotlin.annotation.annotation() internal final annotation class ann : kotlin.Annotation {
|
||||
public constructor ann()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
class A {
|
||||
ann init {}
|
||||
@ann init {}
|
||||
<!UNRESOLVED_REFERENCE!>aaa<!> init {}
|
||||
<!UNRESOLVED_REFERENCE!>@aaa<!> init {}
|
||||
<!WRONG_ANNOTATION_TARGET!>ann<!> init {}
|
||||
<!WRONG_ANNOTATION_TARGET!>@ann<!> init {}
|
||||
<!UNRESOLVED_REFERENCE, WRONG_ANNOTATION_TARGET!>aaa<!> init {}
|
||||
<!UNRESOLVED_REFERENCE, WRONG_ANNOTATION_TARGET!>@aaa<!> init {}
|
||||
}
|
||||
|
||||
interface T {
|
||||
<!ANONYMOUS_INITIALIZER_IN_TRAIT!>ann init {}<!>
|
||||
<!ANONYMOUS_INITIALIZER_IN_TRAIT!>@ann init {}<!>
|
||||
<!ANONYMOUS_INITIALIZER_IN_TRAIT!><!UNRESOLVED_REFERENCE!>aaa<!> init {}<!>
|
||||
<!ANONYMOUS_INITIALIZER_IN_TRAIT!><!UNRESOLVED_REFERENCE!>@aaa<!> init {}<!>
|
||||
<!ANONYMOUS_INITIALIZER_IN_TRAIT!><!WRONG_ANNOTATION_TARGET!>ann<!> init {}<!>
|
||||
<!ANONYMOUS_INITIALIZER_IN_TRAIT!><!WRONG_ANNOTATION_TARGET!>@ann<!> init {}<!>
|
||||
<!ANONYMOUS_INITIALIZER_IN_TRAIT!><!UNRESOLVED_REFERENCE, WRONG_ANNOTATION_TARGET!>aaa<!> init {}<!>
|
||||
<!ANONYMOUS_INITIALIZER_IN_TRAIT!><!UNRESOLVED_REFERENCE, WRONG_ANNOTATION_TARGET!>@aaa<!> init {}<!>
|
||||
}
|
||||
|
||||
annotation class ann
|
||||
@@ -0,0 +1,16 @@
|
||||
target(AnnotationTarget.PROPERTY_GETTER)
|
||||
annotation class smartget
|
||||
|
||||
target(AnnotationTarget.PROPERTY_SETTER)
|
||||
annotation class smartset
|
||||
|
||||
target(AnnotationTarget.FUNCTION)
|
||||
annotation class base
|
||||
|
||||
class My(x: Int) {
|
||||
<!WRONG_ANNOTATION_TARGET!>smartget<!> var y = x
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> @smartget <!WRONG_ANNOTATION_TARGET!>@smartset<!> get
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> <!WRONG_ANNOTATION_TARGET!>@smartget<!> @smartset set
|
||||
|
||||
base <!WRONG_ANNOTATION_TARGET!>smartget<!> <!WRONG_ANNOTATION_TARGET!>smartset<!> fun foo() = y
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package
|
||||
|
||||
internal final class My {
|
||||
public constructor My(/*0*/ x: kotlin.Int)
|
||||
smartget() internal final var y: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
base() smartget() smartset() internal final fun foo(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.FUNCTION}) kotlin.annotation.annotation() internal final annotation class base : kotlin.Annotation {
|
||||
public constructor base()
|
||||
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
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.PROPERTY_GETTER}) kotlin.annotation.annotation() internal final annotation class smartget : kotlin.Annotation {
|
||||
public constructor smartget()
|
||||
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
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.PROPERTY_SETTER}) kotlin.annotation.annotation() internal final annotation class smartset : kotlin.Annotation {
|
||||
public constructor smartset()
|
||||
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
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
target(AnnotationTarget.ANNOTATION_CLASS) annotation class base
|
||||
|
||||
base annotation class derived
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> class correct(<!WRONG_ANNOTATION_TARGET!>base<!> val x: Int) {
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> constructor(): this(0)
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> enum class My {
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> FIRST,
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> SECOND
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> fun foo(<!WRONG_ANNOTATION_TARGET!>base<!> y: <!WRONG_ANNOTATION_TARGET!>@base<!> Int): Int {
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> fun bar(<!WRONG_ANNOTATION_TARGET!>base<!> z: <!WRONG_ANNOTATION_TARGET!>@base<!> Int) = z + 1
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> val local = bar(y)
|
||||
return local
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> val z = 0
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package
|
||||
|
||||
base() internal val z: kotlin.Int = 0
|
||||
base() internal fun foo(/*0*/ base() y: @[base()] kotlin.Int): kotlin.Int
|
||||
|
||||
base() internal final enum class My : kotlin.Enum<My> {
|
||||
base() public enum entry FIRST : My {
|
||||
private constructor FIRST()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
base() public enum entry SECOND : My {
|
||||
private constructor SECOND()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
private constructor My()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): My
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<My>
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.ANNOTATION_CLASS}) kotlin.annotation.annotation() internal final annotation class base : kotlin.Annotation {
|
||||
public constructor base()
|
||||
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
|
||||
}
|
||||
|
||||
base() internal final class correct {
|
||||
base() public constructor correct()
|
||||
public constructor correct(/*0*/ base() x: kotlin.Int)
|
||||
base() 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
|
||||
}
|
||||
|
||||
base() kotlin.annotation.annotation() internal final annotation class derived : kotlin.Annotation {
|
||||
public constructor derived()
|
||||
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
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
target(AnnotationTarget.CLASSIFIER) annotation class base
|
||||
|
||||
base annotation class derived
|
||||
|
||||
base class correct(<!WRONG_ANNOTATION_TARGET!>base<!> val x: Int, <!WRONG_ANNOTATION_TARGET!>base<!> w: <!WRONG_ANNOTATION_TARGET!>@base<!> Int) {
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> constructor(): this(0, 0)
|
||||
}
|
||||
|
||||
base enum class My <!WRONG_ANNOTATION_TARGET!>@base<!> constructor() {
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> FIRST,
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> SECOND
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> fun foo(<!WRONG_ANNOTATION_TARGET!>base<!> y: <!WRONG_ANNOTATION_TARGET!>@base<!> Int): Int {
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> fun bar(<!WRONG_ANNOTATION_TARGET!>base<!> z: <!WRONG_ANNOTATION_TARGET!>@base<!> Int) = z + 1
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> val local = bar(y)
|
||||
return local
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> val z = 0
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package
|
||||
|
||||
base() internal val z: kotlin.Int = 0
|
||||
base() internal fun foo(/*0*/ base() y: @[base()] kotlin.Int): kotlin.Int
|
||||
|
||||
base() internal final enum class My : kotlin.Enum<My> {
|
||||
base() public enum entry FIRST : My {
|
||||
private constructor FIRST()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
base() public enum entry SECOND : My {
|
||||
private constructor SECOND()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
base() private constructor My()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): My
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<My>
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.CLASSIFIER}) kotlin.annotation.annotation() internal final annotation class base : kotlin.Annotation {
|
||||
public constructor base()
|
||||
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
|
||||
}
|
||||
|
||||
base() internal final class correct {
|
||||
base() public constructor correct()
|
||||
public constructor correct(/*0*/ base() x: kotlin.Int, /*1*/ base() w: @[base()] kotlin.Int)
|
||||
base() 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
|
||||
}
|
||||
|
||||
base() kotlin.annotation.annotation() internal final annotation class derived : kotlin.Annotation {
|
||||
public constructor derived()
|
||||
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
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
target(AnnotationTarget.CONSTRUCTOR) annotation class base
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> annotation class derived
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> class correct(<!WRONG_ANNOTATION_TARGET!>base<!> val x: Int) {
|
||||
base constructor(): this(0)
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> enum class My @base constructor() {
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> FIRST,
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> SECOND
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> fun foo(<!WRONG_ANNOTATION_TARGET!>base<!> y: <!WRONG_ANNOTATION_TARGET!>@base<!> Int): Int {
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> fun bar(<!WRONG_ANNOTATION_TARGET!>base<!> z: <!WRONG_ANNOTATION_TARGET!>@base<!> Int) = z + 1
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> val local = bar(y)
|
||||
return local
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> val z = 0
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package
|
||||
|
||||
base() internal val z: kotlin.Int = 0
|
||||
base() internal fun foo(/*0*/ base() y: @[base()] kotlin.Int): kotlin.Int
|
||||
|
||||
base() internal final enum class My : kotlin.Enum<My> {
|
||||
base() public enum entry FIRST : My {
|
||||
private constructor FIRST()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
base() public enum entry SECOND : My {
|
||||
private constructor SECOND()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
base() private constructor My()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): My
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<My>
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.CONSTRUCTOR}) kotlin.annotation.annotation() internal final annotation class base : kotlin.Annotation {
|
||||
public constructor base()
|
||||
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
|
||||
}
|
||||
|
||||
base() internal final class correct {
|
||||
base() public constructor correct()
|
||||
public constructor correct(/*0*/ base() x: kotlin.Int)
|
||||
base() 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
|
||||
}
|
||||
|
||||
base() kotlin.annotation.annotation() internal final annotation class derived : kotlin.Annotation {
|
||||
public constructor derived()
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
target() annotation class empty
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>empty<!> annotation class derived
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>empty<!> class correct(<!WRONG_ANNOTATION_TARGET!>empty<!> val x: Int, <!WRONG_ANNOTATION_TARGET!>empty<!> w: <!WRONG_ANNOTATION_TARGET!>@empty<!> Int) {
|
||||
<!WRONG_ANNOTATION_TARGET!>empty<!> constructor(): this(0, 0)
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>empty<!> enum class My <!WRONG_ANNOTATION_TARGET!>@empty<!> constructor() {
|
||||
<!WRONG_ANNOTATION_TARGET!>@empty<!> FIRST,
|
||||
<!WRONG_ANNOTATION_TARGET!>@empty<!> SECOND
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>empty<!> fun foo(<!WRONG_ANNOTATION_TARGET!>empty<!> y: <!WRONG_ANNOTATION_TARGET!>@empty<!> Int): Int {
|
||||
<!WRONG_ANNOTATION_TARGET!>@empty<!> fun bar(<!WRONG_ANNOTATION_TARGET!>empty<!> z: <!WRONG_ANNOTATION_TARGET!>@empty<!> Int) = z + 1
|
||||
<!WRONG_ANNOTATION_TARGET!>@empty<!> val local = bar(y)
|
||||
return local
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>empty<!> val z = <!WRONG_ANNOTATION_TARGET!>@empty<!> 0
|
||||
@@ -0,0 +1,61 @@
|
||||
package
|
||||
|
||||
empty() internal val z: kotlin.Int
|
||||
empty() internal fun foo(/*0*/ empty() y: @[empty()] kotlin.Int): kotlin.Int
|
||||
|
||||
empty() internal final enum class My : kotlin.Enum<My> {
|
||||
empty() public enum entry FIRST : My {
|
||||
private constructor FIRST()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
empty() public enum entry SECOND : My {
|
||||
private constructor SECOND()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
empty() private constructor My()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): My
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<My>
|
||||
}
|
||||
|
||||
empty() internal final class correct {
|
||||
empty() public constructor correct()
|
||||
public constructor correct(/*0*/ empty() x: kotlin.Int, /*1*/ empty() w: @[empty()] kotlin.Int)
|
||||
empty() 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
|
||||
}
|
||||
|
||||
empty() kotlin.annotation.annotation() internal final annotation class derived : kotlin.Annotation {
|
||||
public constructor derived()
|
||||
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
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {}) kotlin.annotation.annotation() internal final annotation class empty : kotlin.Annotation {
|
||||
public constructor empty()
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
annotation class base
|
||||
|
||||
target(AnnotationTarget.EXPRESSION) annotation class special
|
||||
|
||||
fun transform(i: Int, tr: (Int) -> Int): Int = <!WRONG_ANNOTATION_TARGET!>@base<!> @special tr(@special i)
|
||||
|
||||
base <!WRONG_ANNOTATION_TARGET!>special<!> fun foo(i: Int): Int {
|
||||
val j = <!WRONG_ANNOTATION_TARGET!>@base<!> @special i + 1
|
||||
if (j == 1) return foo(@special <!WRONG_ANNOTATION_TARGET!>@base<!> 42)
|
||||
return transform(@special j, <!WRONG_ANNOTATION_TARGET!>@base<!> @special { @special it * 2 })
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package
|
||||
|
||||
base() special() internal fun foo(/*0*/ i: kotlin.Int): kotlin.Int
|
||||
internal fun transform(/*0*/ i: kotlin.Int, /*1*/ tr: (kotlin.Int) -> kotlin.Int): kotlin.Int
|
||||
|
||||
kotlin.annotation.annotation() internal final annotation class base : kotlin.Annotation {
|
||||
public constructor base()
|
||||
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
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.EXPRESSION}) kotlin.annotation.annotation() internal final annotation class special : kotlin.Annotation {
|
||||
public constructor special()
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
// FILE: annotation.kt
|
||||
|
||||
package test
|
||||
|
||||
target(AnnotationTarget.FILE) annotation class special
|
||||
|
||||
annotation class common
|
||||
|
||||
// FILE: other.kt
|
||||
|
||||
@file:special
|
||||
|
||||
package test
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>special<!> class Incorrect
|
||||
|
||||
// FILE: another.kt
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>@file:common<!>
|
||||
|
||||
package test
|
||||
|
||||
common class Correct
|
||||
@@ -0,0 +1,32 @@
|
||||
package
|
||||
|
||||
package test {
|
||||
|
||||
test.common() internal final class Correct {
|
||||
public constructor Correct()
|
||||
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
|
||||
}
|
||||
|
||||
test.special() internal final class Incorrect {
|
||||
public constructor Incorrect()
|
||||
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
|
||||
}
|
||||
|
||||
kotlin.annotation.annotation() internal final annotation class common : kotlin.Annotation {
|
||||
public constructor common()
|
||||
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
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.FILE}) kotlin.annotation.annotation() internal final annotation class special : kotlin.Annotation {
|
||||
public constructor special()
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
target(AnnotationTarget.FUNCTION) annotation class base
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> annotation class derived
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> class correct(<!WRONG_ANNOTATION_TARGET!>base<!> val x: Int) {
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> constructor(): this(0)
|
||||
|
||||
base public fun baz() {}
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> enum class My <!WRONG_ANNOTATION_TARGET!>@base<!> constructor() {
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> FIRST,
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> SECOND
|
||||
}
|
||||
|
||||
base fun foo(<!WRONG_ANNOTATION_TARGET!>base<!> y: <!WRONG_ANNOTATION_TARGET!>@base<!> Int): Int {
|
||||
@base fun bar(<!WRONG_ANNOTATION_TARGET!>base<!> z: <!WRONG_ANNOTATION_TARGET!>@base<!> Int) = z + 1
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> val local = bar(y)
|
||||
return local
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> val z = 0
|
||||
@@ -0,0 +1,62 @@
|
||||
package
|
||||
|
||||
base() internal val z: kotlin.Int = 0
|
||||
base() internal fun foo(/*0*/ base() y: @[base()] kotlin.Int): kotlin.Int
|
||||
|
||||
base() internal final enum class My : kotlin.Enum<My> {
|
||||
base() public enum entry FIRST : My {
|
||||
private constructor FIRST()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
base() public enum entry SECOND : My {
|
||||
private constructor SECOND()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
base() private constructor My()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): My
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<My>
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.FUNCTION}) kotlin.annotation.annotation() internal final annotation class base : kotlin.Annotation {
|
||||
public constructor base()
|
||||
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
|
||||
}
|
||||
|
||||
base() internal final class correct {
|
||||
base() public constructor correct()
|
||||
public constructor correct(/*0*/ base() x: kotlin.Int)
|
||||
base() internal final val x: kotlin.Int
|
||||
base() public final fun baz(): kotlin.Unit
|
||||
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
|
||||
}
|
||||
|
||||
base() kotlin.annotation.annotation() internal final annotation class derived : kotlin.Annotation {
|
||||
public constructor derived()
|
||||
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
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
target(AnnotationTarget.EXPRESSION)
|
||||
annotation class special
|
||||
|
||||
target(AnnotationTarget.TYPE)
|
||||
annotation class base
|
||||
|
||||
fun transform(i: Int, tr: (@<!DEBUG_INFO_MISSING_UNRESOLVED!>special<!> Int) -> Int): Int = @special tr(@special i)
|
||||
|
||||
fun foo(i: Int): Int {
|
||||
val j = @special i + 1
|
||||
if (j == 1) return foo(@special 42)
|
||||
return transform(@special j, @special { i: @base Int -> <!WRONG_ANNOTATION_TARGET!>@base<!> i * 2 })
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package
|
||||
|
||||
internal fun foo(/*0*/ i: kotlin.Int): kotlin.Int
|
||||
internal fun transform(/*0*/ i: kotlin.Int, /*1*/ tr: (kotlin.Int) -> kotlin.Int): kotlin.Int
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.TYPE}) kotlin.annotation.annotation() internal final annotation class base : kotlin.Annotation {
|
||||
public constructor base()
|
||||
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
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.EXPRESSION}) kotlin.annotation.annotation() internal final annotation class special : kotlin.Annotation {
|
||||
public constructor special()
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
target(AnnotationTarget.<!UNRESOLVED_REFERENCE!>INIT<!>) annotation class incorrect
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>incorrect<!> annotation class derived
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>incorrect<!> class correct(<!WRONG_ANNOTATION_TARGET!>incorrect<!> val x: Int, <!WRONG_ANNOTATION_TARGET!>incorrect<!> w: <!WRONG_ANNOTATION_TARGET!>@incorrect<!> Int) {
|
||||
<!WRONG_ANNOTATION_TARGET!>incorrect<!> constructor(): this(0, 0)
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>incorrect<!> enum class My <!WRONG_ANNOTATION_TARGET!>@incorrect<!> constructor() {
|
||||
<!WRONG_ANNOTATION_TARGET!>@incorrect<!> FIRST,
|
||||
<!WRONG_ANNOTATION_TARGET!>@incorrect<!> SECOND
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>incorrect<!> fun foo(<!WRONG_ANNOTATION_TARGET!>incorrect<!> y: <!WRONG_ANNOTATION_TARGET!>@incorrect<!> Int): Int {
|
||||
<!WRONG_ANNOTATION_TARGET!>@incorrect<!> fun bar(<!WRONG_ANNOTATION_TARGET!>incorrect<!> z: <!WRONG_ANNOTATION_TARGET!>@incorrect<!> Int) = z + 1
|
||||
<!WRONG_ANNOTATION_TARGET!>@incorrect<!> val local = bar(y)
|
||||
return local
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>incorrect<!> val z = <!WRONG_ANNOTATION_TARGET!>@incorrect<!> 0
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package
|
||||
|
||||
incorrect() internal val z: kotlin.Int
|
||||
incorrect() internal fun foo(/*0*/ incorrect() y: @[incorrect()] kotlin.Int): kotlin.Int
|
||||
|
||||
incorrect() internal final enum class My : kotlin.Enum<My> {
|
||||
incorrect() public enum entry FIRST : My {
|
||||
private constructor FIRST()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
incorrect() public enum entry SECOND : My {
|
||||
private constructor SECOND()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
incorrect() private constructor My()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): My
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<My>
|
||||
}
|
||||
|
||||
incorrect() internal final class correct {
|
||||
incorrect() public constructor correct()
|
||||
public constructor correct(/*0*/ incorrect() x: kotlin.Int, /*1*/ incorrect() w: @[incorrect()] kotlin.Int)
|
||||
incorrect() 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
|
||||
}
|
||||
|
||||
incorrect() kotlin.annotation.annotation() internal final annotation class derived : kotlin.Annotation {
|
||||
public constructor derived()
|
||||
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
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {}) kotlin.annotation.annotation() internal final annotation class incorrect : kotlin.Annotation {
|
||||
public constructor incorrect()
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
annotation class base
|
||||
|
||||
base class My {
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> init {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package
|
||||
|
||||
base() internal final class My {
|
||||
public constructor My()
|
||||
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
|
||||
}
|
||||
|
||||
kotlin.annotation.annotation() internal final annotation class base : kotlin.Annotation {
|
||||
public constructor base()
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
target(AnnotationTarget.LOCAL_VARIABLE) annotation class base
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> annotation class derived
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> class correct(<!WRONG_ANNOTATION_TARGET!>base<!> val x: Int) {
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> constructor(): this(0)
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> enum class My {
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> FIRST,
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> SECOND
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> fun foo(<!WRONG_ANNOTATION_TARGET!>base<!> y: <!WRONG_ANNOTATION_TARGET!>@base<!> Int): Int {
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> fun bar(<!WRONG_ANNOTATION_TARGET!>base<!> z: <!WRONG_ANNOTATION_TARGET!>@base<!> Int) = z + 1
|
||||
@base val local = bar(y)
|
||||
return local
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> val z = 0
|
||||
@@ -0,0 +1,61 @@
|
||||
package
|
||||
|
||||
base() internal val z: kotlin.Int = 0
|
||||
base() internal fun foo(/*0*/ base() y: @[base()] kotlin.Int): kotlin.Int
|
||||
|
||||
base() internal final enum class My : kotlin.Enum<My> {
|
||||
base() public enum entry FIRST : My {
|
||||
private constructor FIRST()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
base() public enum entry SECOND : My {
|
||||
private constructor SECOND()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
private constructor My()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): My
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<My>
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.LOCAL_VARIABLE}) kotlin.annotation.annotation() internal final annotation class base : kotlin.Annotation {
|
||||
public constructor base()
|
||||
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
|
||||
}
|
||||
|
||||
base() internal final class correct {
|
||||
base() public constructor correct()
|
||||
public constructor correct(/*0*/ base() x: kotlin.Int)
|
||||
base() 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
|
||||
}
|
||||
|
||||
base() kotlin.annotation.annotation() internal final annotation class derived : kotlin.Annotation {
|
||||
public constructor derived()
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
target(AnnotationTarget.CLASSIFIER)
|
||||
annotation class base
|
||||
|
||||
target(AnnotationTarget.ANNOTATION_CLASS)
|
||||
annotation class meta
|
||||
|
||||
base class Outer {
|
||||
base <!WRONG_ANNOTATION_TARGET!>meta<!> class Nested
|
||||
|
||||
base meta annotation class Annotated
|
||||
|
||||
fun foo() {
|
||||
@base <!WRONG_ANNOTATION_TARGET!>@meta<!> class Local
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package
|
||||
|
||||
base() internal final class Outer {
|
||||
public constructor Outer()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
internal final fun foo(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
base() meta() kotlin.annotation.annotation() internal final annotation class Annotated : kotlin.Annotation {
|
||||
public constructor Annotated()
|
||||
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
|
||||
}
|
||||
|
||||
base() meta() internal final class Nested {
|
||||
public constructor Nested()
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.CLASSIFIER}) kotlin.annotation.annotation() internal final annotation class base : kotlin.Annotation {
|
||||
public constructor base()
|
||||
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
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.ANNOTATION_CLASS}) kotlin.annotation.annotation() internal final annotation class meta : kotlin.Annotation {
|
||||
public constructor meta()
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
target(AnnotationTarget.PROPERTY) annotation class base
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> annotation class derived
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> class correct(base val x: Int, <!WRONG_ANNOTATION_TARGET!>base<!> w: Int) {
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> constructor(): this(0, 0)
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> enum class My {
|
||||
@base FIRST,
|
||||
@base SECOND
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> fun foo(<!WRONG_ANNOTATION_TARGET!>base<!> y: <!WRONG_ANNOTATION_TARGET!>@base<!> Int): Int {
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> fun bar(<!WRONG_ANNOTATION_TARGET!>base<!> z: <!WRONG_ANNOTATION_TARGET!>@base<!> Int) = z + 1
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> val local = bar(y)
|
||||
return local
|
||||
}
|
||||
|
||||
base val z = 0
|
||||
@@ -0,0 +1,61 @@
|
||||
package
|
||||
|
||||
base() internal val z: kotlin.Int = 0
|
||||
base() internal fun foo(/*0*/ base() y: @[base()] kotlin.Int): kotlin.Int
|
||||
|
||||
base() internal final enum class My : kotlin.Enum<My> {
|
||||
base() public enum entry FIRST : My {
|
||||
private constructor FIRST()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
base() public enum entry SECOND : My {
|
||||
private constructor SECOND()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
private constructor My()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): My
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<My>
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.PROPERTY}) kotlin.annotation.annotation() internal final annotation class base : kotlin.Annotation {
|
||||
public constructor base()
|
||||
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
|
||||
}
|
||||
|
||||
base() internal final class correct {
|
||||
base() public constructor correct()
|
||||
public constructor correct(/*0*/ base() x: kotlin.Int, /*1*/ base() w: kotlin.Int)
|
||||
base() 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
|
||||
}
|
||||
|
||||
base() kotlin.annotation.annotation() internal final annotation class derived : kotlin.Annotation {
|
||||
public constructor derived()
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
annotation class base
|
||||
|
||||
target(AnnotationTarget.TYPE)
|
||||
annotation class typed
|
||||
|
||||
base class My(val x: <!WRONG_ANNOTATION_TARGET!>@base<!> @typed Int, y: <!WRONG_ANNOTATION_TARGET!>@base<!> @typed Int) {
|
||||
val z: <!WRONG_ANNOTATION_TARGET!>@base<!> @typed Int = y
|
||||
fun foo(): <!WRONG_ANNOTATION_TARGET!>@base<!> @typed Int = z
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package
|
||||
|
||||
base() internal final class My {
|
||||
public constructor My(/*0*/ x: @[base() typed()] kotlin.Int, /*1*/ y: @[base() typed()] kotlin.Int)
|
||||
internal final val x: @[base() typed()] kotlin.Int
|
||||
internal final val z: @[base() typed()] kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
internal final fun foo(): @[base() typed()] kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
kotlin.annotation.annotation() internal final annotation class base : kotlin.Annotation {
|
||||
public constructor base()
|
||||
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
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.TYPE}) kotlin.annotation.annotation() internal final annotation class typed : kotlin.Annotation {
|
||||
public constructor typed()
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
@file:suppress("abc")
|
||||
@@ -0,0 +1 @@
|
||||
package
|
||||
@@ -0,0 +1,20 @@
|
||||
target(AnnotationTarget.TYPE) annotation class base
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> annotation class derived
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> class correct(<!WRONG_ANNOTATION_TARGET!>base<!> val x: @base Int) {
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> constructor(): this(0)
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> enum class My <!WRONG_ANNOTATION_TARGET!>@base<!> constructor() {
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> FIRST,
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> SECOND
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> fun foo(<!WRONG_ANNOTATION_TARGET!>base<!> y: @base Int): Int {
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> fun bar(<!WRONG_ANNOTATION_TARGET!>base<!> z: @base Int) = z + 1
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> val local = bar(y)
|
||||
return local
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> val z = 0
|
||||
@@ -0,0 +1,61 @@
|
||||
package
|
||||
|
||||
base() internal val z: kotlin.Int = 0
|
||||
base() internal fun foo(/*0*/ base() y: @[base()] kotlin.Int): kotlin.Int
|
||||
|
||||
base() internal final enum class My : kotlin.Enum<My> {
|
||||
base() public enum entry FIRST : My {
|
||||
private constructor FIRST()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
base() public enum entry SECOND : My {
|
||||
private constructor SECOND()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
base() private constructor My()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): My
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<My>
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.TYPE}) kotlin.annotation.annotation() internal final annotation class base : kotlin.Annotation {
|
||||
public constructor base()
|
||||
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
|
||||
}
|
||||
|
||||
base() internal final class correct {
|
||||
base() public constructor correct()
|
||||
public constructor correct(/*0*/ base() x: @[base()] kotlin.Int)
|
||||
base() internal final val x: @[base()] 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
|
||||
}
|
||||
|
||||
base() kotlin.annotation.annotation() internal final annotation class derived : kotlin.Annotation {
|
||||
public constructor derived()
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
annotation class base
|
||||
|
||||
val x: List<@<!DEBUG_INFO_MISSING_UNRESOLVED!>base<!> String>? = null
|
||||
@@ -0,0 +1,10 @@
|
||||
package
|
||||
|
||||
internal val x: kotlin.List<kotlin.String>? = null
|
||||
|
||||
kotlin.annotation.annotation() internal final annotation class base : kotlin.Annotation {
|
||||
public constructor base()
|
||||
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
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
target(AnnotationTarget.VALUE_PARAMETER) annotation class base
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> annotation class derived
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> class correct(<!WRONG_ANNOTATION_TARGET!>base<!> val x: Int, base w: Int) {
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> constructor(): this(0, 0)
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> enum class My {
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> FIRST,
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> SECOND
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> fun foo(base y: <!WRONG_ANNOTATION_TARGET!>@base<!> Int): Int {
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> fun bar(base z: <!WRONG_ANNOTATION_TARGET!>@base<!> Int) = z + 1
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> val local = bar(y)
|
||||
return local
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> val z = 0
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package
|
||||
|
||||
base() internal val z: kotlin.Int = 0
|
||||
base() internal fun foo(/*0*/ base() y: @[base()] kotlin.Int): kotlin.Int
|
||||
|
||||
base() internal final enum class My : kotlin.Enum<My> {
|
||||
base() public enum entry FIRST : My {
|
||||
private constructor FIRST()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
base() public enum entry SECOND : My {
|
||||
private constructor SECOND()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
private constructor My()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: My): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): My
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<My>
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.VALUE_PARAMETER}) kotlin.annotation.annotation() internal final annotation class base : kotlin.Annotation {
|
||||
public constructor base()
|
||||
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
|
||||
}
|
||||
|
||||
base() internal final class correct {
|
||||
base() public constructor correct()
|
||||
public constructor correct(/*0*/ base() x: kotlin.Int, /*1*/ base() w: kotlin.Int)
|
||||
base() 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
|
||||
}
|
||||
|
||||
base() kotlin.annotation.annotation() internal final annotation class derived : kotlin.Annotation {
|
||||
public constructor derived()
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user