Deprecate escaped modifiers and unescaped annotations
This commit is contained in:
@@ -140,6 +140,11 @@ public interface Errors {
|
||||
DiagnosticFactory0<PsiElement> INAPPLICABLE_PARAM_TARGET = DiagnosticFactory0.create(ERROR);
|
||||
DiagnosticFactory1<PsiElement, String> REDUNDANT_ANNOTATION_TARGET = DiagnosticFactory1.create(WARNING);
|
||||
|
||||
DiagnosticFactory0<JetAnnotationEntry> DEPRECATED_UNESCAPED_ANNOTATION = DiagnosticFactory0.create(WARNING);
|
||||
DiagnosticFactory0<PsiElement> DEPRECATED_ESCAPED_MODIFIER = DiagnosticFactory0.create(WARNING);
|
||||
DiagnosticFactory1<JetAnnotationEntry, String> DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER = DiagnosticFactory1.create(WARNING);
|
||||
|
||||
|
||||
// Classes and traits
|
||||
|
||||
DiagnosticFactory0<JetTypeProjection> PROJECTION_IN_IMMEDIATE_ARGUMENT_TO_SUPERTYPE =
|
||||
|
||||
+4
@@ -132,6 +132,10 @@ public class DefaultErrorMessages {
|
||||
MAP.put(INAPPLICABLE_PARAM_TARGET, "''@param:'' annotations could be applied only to primary constructor parameters");
|
||||
MAP.put(REDUNDANT_ANNOTATION_TARGET, "Redundant annotation target ''{0}''", STRING);
|
||||
|
||||
MAP.put(DEPRECATED_UNESCAPED_ANNOTATION, "Annotations without '@' are deprecated now");
|
||||
MAP.put(DEPRECATED_ESCAPED_MODIFIER, "Modifiers with '@' are deprecated now");
|
||||
MAP.put(DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER, "Annotation ''{0}'' will become a modifier soon. Do not use ''@'' before it", STRING);
|
||||
|
||||
MAP.put(REDUNDANT_MODIFIER, "Modifier ''{0}'' is redundant because ''{1}'' is present", TO_STRING, TO_STRING);
|
||||
MAP.put(ABSTRACT_MODIFIER_IN_TRAIT, "Modifier ''abstract'' is redundant in interface");
|
||||
MAP.put(REDUNDANT_MODIFIER_IN_GETTER, "Visibility modifiers are redundant in getter");
|
||||
|
||||
@@ -108,6 +108,12 @@ public class JetAnnotationEntry extends JetElementImplStub<KotlinAnnotationEntry
|
||||
return findChildByType(JetTokens.AT);
|
||||
}
|
||||
|
||||
public boolean hasAtSymbolOrInList() {
|
||||
if (getStub() != null) return true;
|
||||
|
||||
return getAtSymbol() != null || getParent() instanceof JetAnnotation;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public JetAnnotationUseSiteTarget getUseSiteTarget() {
|
||||
JetAnnotationUseSiteTarget target = getStubOrPsiChild(JetStubElementTypes.ANNOTATION_TARGET);
|
||||
|
||||
@@ -18,6 +18,7 @@ package org.jetbrains.kotlin.resolve
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.annotations.ANNOTATION_MODIFIERS_FQ_NAMES
|
||||
import org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.annotations.AnnotationUseSiteTarget
|
||||
import org.jetbrains.kotlin.diagnostics.Errors
|
||||
@@ -30,6 +31,7 @@ import org.jetbrains.kotlin.types.TypeUtils
|
||||
import org.jetbrains.kotlin.descriptors.annotations.KotlinTarget
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.isRepeatableAnnotation
|
||||
import org.jetbrains.kotlin.descriptors.annotations.KotlinTarget.*
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe
|
||||
import kotlin.platform.platformStatic
|
||||
|
||||
public class AnnotationChecker(private val additionalCheckers: Iterable<AdditionalAnnotationChecker>) {
|
||||
@@ -71,6 +73,15 @@ public class AnnotationChecker(private val additionalCheckers: Iterable<Addition
|
||||
val descriptor = trace.get(BindingContext.ANNOTATION, entry) ?: continue
|
||||
val classDescriptor = TypeUtils.getClassDescriptor(descriptor.type) ?: continue
|
||||
|
||||
if (classDescriptor.fqNameSafe in ANNOTATION_MODIFIERS_FQ_NAMES) {
|
||||
trace.report(Errors.DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER.on(entry, classDescriptor.name.toString()))
|
||||
}
|
||||
else {
|
||||
if (!entry.hasAtSymbolOrInList()) {
|
||||
trace.report(Errors.DEPRECATED_UNESCAPED_ANNOTATION.on(entry))
|
||||
}
|
||||
}
|
||||
|
||||
val useSiteTarget = entry.useSiteTarget?.getAnnotationUseSiteTarget()
|
||||
val existingTargetsForAnnotation = entryTypesWithAnnotations.getOrPut(descriptor.type) { arrayListOf() }
|
||||
val duplicateAnnotation = useSiteTarget in existingTargetsForAnnotation
|
||||
|
||||
@@ -203,6 +203,9 @@ public object ModifierCheckerCore {
|
||||
else if (!checkParent(trace, second, parentDescriptor)) {
|
||||
incorrectNodes += second
|
||||
}
|
||||
else if ((second.elementType is JetModifierKeywordToken) && second.psi.textContains('@')) {
|
||||
trace.report(Errors.DEPRECATED_ESCAPED_MODIFIER.on(second.psi))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
fun test() {
|
||||
@tailrec fun g3(counter : Int) {
|
||||
tailrec fun g3(counter : Int) {
|
||||
if (counter > 0) { g3(counter - 1) }
|
||||
}
|
||||
g3(1000000)
|
||||
|
||||
+1
-1
@@ -18,6 +18,6 @@ fun test() : Unit {
|
||||
val <!UNUSED_VARIABLE!>s<!> = "" <!USELESS_CAST!>as Any<!>
|
||||
("" as String?)?.length()
|
||||
(data@("" as String?))?.length()
|
||||
(<!WRONG_ANNOTATION_TARGET!>@data()<!>( "" as String?))?.length()
|
||||
(<!WRONG_ANNOTATION_TARGET!>@MustBeDocumented()<!>( "" as String?))?.length()
|
||||
Unit
|
||||
}
|
||||
|
||||
@@ -6,4 +6,4 @@ package foo
|
||||
|
||||
// FILE: b.kt
|
||||
|
||||
<!UNRESOLVED_REFERENCE!>foo<!> fun bar(p: <!UNRESOLVED_REFERENCE!>foo<!>): <!UNRESOLVED_REFERENCE!>foo<!> = null!!
|
||||
<!UNRESOLVED_REFERENCE!>@foo<!> fun bar(p: <!UNRESOLVED_REFERENCE!>foo<!>): <!UNRESOLVED_REFERENCE!>foo<!> = null!!
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
import java.util.ArrayList
|
||||
|
||||
<!NONE_APPLICABLE!>ArrayList<!><Int>(1, 1) fun b() {}
|
||||
<!UNRESOLVED_REFERENCE!>Xoo<!>(<!UNRESOLVED_REFERENCE!>x<!>) fun c() {}
|
||||
<!DEPRECATED_JAVA_ANNOTATION!>java.lang.Deprecated(<!UNRESOLVED_REFERENCE, TOO_MANY_ARGUMENTS!>x<!>)<!> fun a() {}
|
||||
@<!NONE_APPLICABLE!>ArrayList<!><Int>(1, 1) fun b() {}
|
||||
<!UNRESOLVED_REFERENCE!>@Xoo<!>(<!UNRESOLVED_REFERENCE!>x<!>) fun c() {}
|
||||
<!DEPRECATED_JAVA_ANNOTATION!>@java.lang.Deprecated(<!UNRESOLVED_REFERENCE, TOO_MANY_ARGUMENTS!>x<!>)<!> fun a() {}
|
||||
@@ -1,2 +1,2 @@
|
||||
annotation class ann
|
||||
class Annotated(ann val x: Int)
|
||||
class Annotated(@ann val x: Int)
|
||||
+4
-4
@@ -4,12 +4,12 @@ import java.lang.Deprecated as deprecated
|
||||
import java.lang.SuppressWarnings as suppresswarnings
|
||||
|
||||
|
||||
<!DEPRECATED_JAVA_ANNOTATION!>deprecated<!> suppresswarnings val s: String = "";
|
||||
<!DEPRECATED_JAVA_ANNOTATION!>@deprecated<!> @suppresswarnings val s: String = "";
|
||||
|
||||
<!DEPRECATED_JAVA_ANNOTATION!>deprecated<!> suppresswarnings fun main(args : Array<String>) {
|
||||
<!DEPRECATED_JAVA_ANNOTATION!>@deprecated<!> @suppresswarnings fun main(args : Array<String>) {
|
||||
System.out.println("Hello, world!")
|
||||
}
|
||||
|
||||
class Test(<!DEPRECATED_JAVA_ANNOTATION!>deprecated<!> val s: String,
|
||||
suppresswarnings val x : Int) {}
|
||||
class Test(<!DEPRECATED_JAVA_ANNOTATION!>@deprecated<!> val s: String,
|
||||
@suppresswarnings val x : Int) {}
|
||||
|
||||
|
||||
+1
-1
@@ -2,4 +2,4 @@ annotation class Base(val x: Int)
|
||||
|
||||
annotation class UseBase(val b: Base = Base(0))
|
||||
|
||||
UseBase class My
|
||||
@UseBase class My
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// Check that there won't be "Rewrite at slice ANNOTATION key" exception - EA-36935
|
||||
<!UNRESOLVED_REFERENCE!>someErrorAnnotation<!> object Test {
|
||||
<!UNRESOLVED_REFERENCE!>@someErrorAnnotation<!> object Test {
|
||||
}
|
||||
@@ -6,11 +6,11 @@ annotation class annotation
|
||||
|
||||
package test
|
||||
|
||||
<!NOT_AN_ANNOTATION_CLASS!>test.annotation<!> class annotation
|
||||
<!NOT_AN_ANNOTATION_CLASS!>@test.annotation<!> class annotation
|
||||
|
||||
kotlin.annotation.annotation class realAnnotation
|
||||
<!DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER!>@kotlin.annotation.annotation<!> class realAnnotation
|
||||
|
||||
realAnnotation class My
|
||||
@realAnnotation class My
|
||||
|
||||
// FILE: other/c.kt
|
||||
|
||||
@@ -18,8 +18,8 @@ package other
|
||||
|
||||
annotation class My
|
||||
|
||||
<!NOT_AN_ANNOTATION_CLASS!>test.annotation<!> class Your
|
||||
<!NOT_AN_ANNOTATION_CLASS!>@test.annotation<!> class Your
|
||||
|
||||
kotlin.annotation.annotation class His
|
||||
<!DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER!>@kotlin.annotation.annotation<!> class His
|
||||
|
||||
My class Our
|
||||
@My class Our
|
||||
@@ -2,5 +2,5 @@ package test
|
||||
|
||||
annotation class A(val a: Int = 12, val b: String = "Test", val c: String)
|
||||
|
||||
A(a = 12, c = "Hello")
|
||||
@A(a = 12, c = "Hello")
|
||||
object SomeObject
|
||||
|
||||
@@ -2,9 +2,9 @@ annotation class my
|
||||
annotation class my1(val i : Int)
|
||||
annotation class my2(val i : Int = 0)
|
||||
|
||||
my fun foo() {}
|
||||
<!NO_VALUE_FOR_PARAMETER!>my1<!> fun foo2() {}
|
||||
my1(2) fun foo3() {}
|
||||
my2() fun foo4() {}
|
||||
my2 fun foo41() {}
|
||||
my2(2) fun foo42() {}
|
||||
@my fun foo() {}
|
||||
@<!NO_VALUE_FOR_PARAMETER!>my1<!> fun foo2() {}
|
||||
@my1(2) fun foo3() {}
|
||||
@my2() fun foo4() {}
|
||||
@my2 fun foo41() {}
|
||||
@my2(2) fun foo42() {}
|
||||
|
||||
@@ -6,11 +6,11 @@ annotation class Ann3(val a: Ann1 = Ann1(1))
|
||||
|
||||
annotation class Ann4(val value: String)
|
||||
|
||||
Ann2(Ann1(1)) val a = 1
|
||||
@Ann2(Ann1(1)) val a = 1
|
||||
|
||||
Ann2(a = Ann1(1)) val c = 2
|
||||
@Ann2(a = Ann1(1)) val c = 2
|
||||
|
||||
Ann4("a") class MyClass
|
||||
@Ann4("a") class MyClass
|
||||
|
||||
fun foo() {
|
||||
<!ANNOTATION_CLASS_CONSTRUCTOR_CALL!>Ann()<!>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: script.kts
|
||||
|
||||
@annotation class Ann
|
||||
annotation class Ann
|
||||
|
||||
@Ann<!SYNTAX!><!>
|
||||
@@ -1,5 +1,5 @@
|
||||
import java.lang.Deprecated as deprecated
|
||||
|
||||
<!DEPRECATED_JAVA_ANNOTATION!>java.lang.Deprecated<!> fun foo() {}
|
||||
<!DEPRECATED_JAVA_ANNOTATION!>@java.lang.Deprecated<!> fun foo() {}
|
||||
|
||||
<!DEPRECATED_JAVA_ANNOTATION!>deprecated<!> fun foo1() {}
|
||||
<!DEPRECATED_JAVA_ANNOTATION!>@deprecated<!> fun foo1() {}
|
||||
+2
-2
@@ -3,6 +3,6 @@ import java.lang.annotation.*
|
||||
<!DEPRECATED_JAVA_ANNOTATION!>@java.lang.annotation.Retention(RetentionPolicy.CLASS)<!>
|
||||
annotation class my
|
||||
|
||||
<!DEPRECATED_JAVA_ANNOTATION!>Retention(RetentionPolicy.RUNTIME)<!>
|
||||
<!DEPRECATED_JAVA_ANNOTATION!>Target(ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR)<!>
|
||||
<!DEPRECATED_JAVA_ANNOTATION!>@Retention(RetentionPolicy.RUNTIME)<!>
|
||||
<!DEPRECATED_JAVA_ANNOTATION!>@Target(ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR)<!>
|
||||
annotation class my1
|
||||
Vendored
+2
-2
@@ -1,4 +1,4 @@
|
||||
// Functions can be recursively annotated
|
||||
annotation class ann(val x: Int)
|
||||
ann(<!ANNOTATION_PARAMETER_MUST_BE_CONST!>bar()<!>) fun foo() = 1
|
||||
ann(<!ANNOTATION_PARAMETER_MUST_BE_CONST!>foo()<!>) fun bar() = 2
|
||||
@ann(<!ANNOTATION_PARAMETER_MUST_BE_CONST!>bar()<!>) fun foo() = 1
|
||||
@ann(<!ANNOTATION_PARAMETER_MUST_BE_CONST!>foo()<!>) fun bar() = 2
|
||||
@@ -1,3 +1,3 @@
|
||||
class Foo
|
||||
|
||||
<!NOT_AN_ANNOTATION_CLASS!>Foo<!> class Bar
|
||||
<!NOT_AN_ANNOTATION_CLASS!>@Foo<!> class Bar
|
||||
@@ -1,3 +1,3 @@
|
||||
// Class CAN be recursively annotated
|
||||
RecursivelyAnnotated(1)
|
||||
@RecursivelyAnnotated(1)
|
||||
annotation class RecursivelyAnnotated(val x: Int)
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
// Functions can be recursively annotated
|
||||
annotation class ann(val x: Int)
|
||||
ann(<!ANNOTATION_PARAMETER_MUST_BE_CONST!>foo()<!>) fun foo() = 1
|
||||
@ann(<!ANNOTATION_PARAMETER_MUST_BE_CONST!>foo()<!>) fun foo() = 1
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
// Properties can be recursively annotated
|
||||
annotation class ann(val x: Int)
|
||||
ann(x) val x: Int = 1
|
||||
@ann(x) val x: Int = 1
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
// Class constructor parameter CAN be recursively annotated
|
||||
annotation class RecursivelyAnnotated(RecursivelyAnnotated(1) val x: Int)
|
||||
annotation class RecursivelyAnnotated(@RecursivelyAnnotated(1) val x: Int)
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// Properties can be recursively annotated
|
||||
annotation class ann(val x: Int)
|
||||
class My {
|
||||
ann(<!ANNOTATION_PARAMETER_MUST_BE_CONST!>x<!>) val x: Int = 1
|
||||
@ann(<!ANNOTATION_PARAMETER_MUST_BE_CONST!>x<!>) val x: Int = 1
|
||||
}
|
||||
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
||||
// Class constructor parameter CAN be recursively annotated
|
||||
class RecursivelyAnnotated(<!NOT_AN_ANNOTATION_CLASS!>RecursivelyAnnotated(1)<!> val x: Int)
|
||||
class RecursivelyAnnotated(<!NOT_AN_ANNOTATION_CLASS!>@RecursivelyAnnotated(1)<!> val x: Int)
|
||||
+1
-1
@@ -3,7 +3,7 @@ package test
|
||||
// Checks that there is no rewrite error at ANNOTATION slice because of resolving annotations for object in lazy resolve and resolving
|
||||
// object as property (method tries to resolve annotations too).
|
||||
|
||||
<!UNRESOLVED_REFERENCE!>BadAnnotation<!>
|
||||
<!UNRESOLVED_REFERENCE!>@BadAnnotation<!>
|
||||
object SomeObject
|
||||
|
||||
val some = SomeObject
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package test
|
||||
|
||||
BadAnnotation(<!CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>)
|
||||
@BadAnnotation(<!CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>)
|
||||
object SomeObject
|
||||
|
||||
val some = SomeObject
|
||||
|
||||
Vendored
+2
-2
@@ -1,6 +1,6 @@
|
||||
annotation class AnnE(val i: MyEnum)
|
||||
|
||||
AnnE(<!ANNOTATION_PARAMETER_MUST_BE_ENUM_CONST!>e<!>)
|
||||
@AnnE(<!ANNOTATION_PARAMETER_MUST_BE_ENUM_CONST!>e<!>)
|
||||
class Test
|
||||
|
||||
val e: MyEnum = MyEnum.A
|
||||
@@ -9,5 +9,5 @@ enum class MyEnum {
|
||||
A
|
||||
}
|
||||
|
||||
AnnE(<!TYPE_MISMATCH!>Test()<!>)
|
||||
@AnnE(<!TYPE_MISMATCH!>Test()<!>)
|
||||
class Test2
|
||||
Vendored
+1
-1
@@ -13,7 +13,7 @@ public class Test {
|
||||
// FILE: a.kt
|
||||
annotation class Ann(vararg val i: Int)
|
||||
|
||||
Ann(
|
||||
@Ann(
|
||||
<!ANNOTATION_PARAMETER_MUST_BE_CONST!>Test.i1<!>,
|
||||
Test.i2,
|
||||
<!ANNOTATION_PARAMETER_MUST_BE_CONST!>Test.i3<!>,
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
annotation class Ann(vararg val i: Int)
|
||||
|
||||
Ann(
|
||||
@Ann(
|
||||
<!ANNOTATION_PARAMETER_MUST_BE_CONST!>i1<!>,
|
||||
i2,
|
||||
<!ANNOTATION_PARAMETER_MUST_BE_CONST!>i3<!>,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
@Repeatable
|
||||
annotation class Ann(val x: Int = 6)
|
||||
|
||||
@Ann(1) @Ann(2) @Ann(3) @private class A @Ann constructor() {
|
||||
@Ann(1) @Ann(2) @Ann(3) private class A @Ann constructor() {
|
||||
@Ann(x = 5) fun foo() {
|
||||
1 + @Ann(1) 1 * @Ann(<!TYPE_MISMATCH!>""<!>) 6
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
fun foo(<!UNRESOLVED_REFERENCE!>varargs<!> <!UNUSED_PARAMETER!>f<!> : Int) {}
|
||||
fun foo(<!UNRESOLVED_REFERENCE, DEPRECATED_UNESCAPED_ANNOTATION!>varargs<!> <!UNUSED_PARAMETER!>f<!> : Int) {}
|
||||
|
||||
var bar : Int = 1
|
||||
set(<!UNRESOLVED_REFERENCE!>varargs<!> v) {}
|
||||
|
||||
val x : (Int) -> Int = {<!UNRESOLVED_REFERENCE!>@varargs<!> <!TYPE_MISMATCH!>x<!> <!DEPRECATED_STATIC_ASSERT!>: Int<!> <!SYNTAX!>-> x<!>}
|
||||
|
||||
class Hello(<!UNRESOLVED_REFERENCE!>varargs<!> <!UNUSED_PARAMETER!>args<!>: Any) {
|
||||
class Hello(<!UNRESOLVED_REFERENCE, DEPRECATED_UNESCAPED_ANNOTATION!>varargs<!> <!UNUSED_PARAMETER!>args<!>: Any) {
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
@Target(AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.EXPRESSION)
|
||||
annotation class test
|
||||
|
||||
fun foo(test <!UNUSED_PARAMETER!>f<!> : Int) {}
|
||||
fun foo(@test <!UNUSED_PARAMETER!>f<!> : Int) {}
|
||||
|
||||
var bar : Int = 1
|
||||
set(test v) {}
|
||||
|
||||
val x : (Int) -> Int = {@test <!TYPE_MISMATCH!>x<!> <!DEPRECATED_STATIC_ASSERT!>: Int<!> <!SYNTAX!>-> x<!>} // todo fix parser annotation on lambda parameter
|
||||
|
||||
class Hello(test <!UNUSED_PARAMETER!>args<!>: Any) {
|
||||
class Hello(@test <!UNUSED_PARAMETER!>args<!>: Any) {
|
||||
}
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE -NOTHING_TO_INLINE -NOT_YET_SUPPORTED_IN_INLINE
|
||||
import kotlin.external as myNative
|
||||
<!DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER!>@annotation<!> <!DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER!>@data<!> <!DEPRECATED_ESCAPED_MODIFIER!>@public<!> class Ann(val arg: Int = 1)
|
||||
|
||||
|
||||
<!DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER!>@inline<!> <!DEPRECATED_ESCAPED_MODIFIER!>@private<!> fun bar(block: () -> Int) = block()
|
||||
|
||||
<!DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER!>@data<!> class Q(val x: Int, val y: Int)
|
||||
|
||||
fun bar2(): Array<Q> = null!!
|
||||
|
||||
<!DEPRECATED_ESCAPED_MODIFIER!>@open<!> class A <!DEPRECATED_ESCAPED_MODIFIER!>@private<!> constructor(<!DEPRECATED_ESCAPED_MODIFIER!>@private<!> val prop: Int) {
|
||||
<!DEPRECATED_ESCAPED_MODIFIER!>@private<!> val x = 1
|
||||
<!DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER!>@inline<!> fun foo(<!DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER!>@noinline<!> x: Int) {
|
||||
<!DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER!>@data<!> class Local
|
||||
|
||||
<!DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER!>@inline<!> fun localFun() {}
|
||||
}
|
||||
|
||||
<!DEPRECATED_ESCAPED_MODIFIER!>@private<!> object O1 {}
|
||||
<!DEPRECATED_ESCAPED_MODIFIER!>@public<!> <!DEPRECATED_ESCAPED_MODIFIER!>@companion<!> object O2 {}
|
||||
}
|
||||
|
||||
<!DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER!>kotlin.inline<!> fun baz() { }
|
||||
<!DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER!>kotlin.data<!> class Data
|
||||
|
||||
<!DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER!>myNative<!> fun nativeFun(): Int
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
package
|
||||
|
||||
kotlin.inline() private fun bar(/*0*/ block: () -> kotlin.Int): kotlin.Int
|
||||
public fun bar2(): kotlin.Array<Q>
|
||||
kotlin.inline() public fun baz(): kotlin.Unit
|
||||
kotlin.external() public fun nativeFun(): kotlin.Int
|
||||
|
||||
public open class A {
|
||||
private constructor A(/*0*/ prop: kotlin.Int)
|
||||
private final val prop: kotlin.Int
|
||||
private final val x: kotlin.Int = 1
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
kotlin.inline() public final fun foo(/*0*/ kotlin.noinline() x: kotlin.Int): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
private object O1 {
|
||||
private constructor O1()
|
||||
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
|
||||
}
|
||||
|
||||
public companion object O2 {
|
||||
private constructor O2()
|
||||
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() kotlin.data() public final class Ann : kotlin.Annotation {
|
||||
public constructor Ann(/*0*/ arg: kotlin.Int = ...)
|
||||
public final val arg: kotlin.Int
|
||||
public final /*synthesized*/ fun component1(): kotlin.Int
|
||||
public final /*synthesized*/ fun copy(/*0*/ arg: kotlin.Int = ...): 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
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
kotlin.data() public final class Data {
|
||||
public constructor Data()
|
||||
public final /*synthesized*/ fun copy(): Data
|
||||
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.data() public final class Q {
|
||||
public constructor Q(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int)
|
||||
public final val x: kotlin.Int
|
||||
public final val y: kotlin.Int
|
||||
public final /*synthesized*/ fun component1(): kotlin.Int
|
||||
public final /*synthesized*/ fun component2(): kotlin.Int
|
||||
public final /*synthesized*/ fun copy(/*0*/ x: kotlin.Int = ..., /*1*/ y: kotlin.Int = ...): Q
|
||||
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
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
annotation class Ann(val arg: Int = 1)
|
||||
|
||||
<!DEPRECATED_UNESCAPED_ANNOTATION!>Ann<!> class A <!DEPRECATED_UNESCAPED_ANNOTATION!>Ann<!> constructor(<!DEPRECATED_UNESCAPED_ANNOTATION!>Ann<!> val prop: Int) {
|
||||
<!DEPRECATED_UNESCAPED_ANNOTATION!>Ann<!> val x = 1
|
||||
<!DEPRECATED_UNESCAPED_ANNOTATION!>Ann<!> fun foo(<!DEPRECATED_UNESCAPED_ANNOTATION!>Ann<!> x: Int) {}
|
||||
|
||||
<!DEPRECATED_UNESCAPED_ANNOTATION!>Ann<!> object O1 {}
|
||||
<!DEPRECATED_UNESCAPED_ANNOTATION!>Ann<!> companion object O2 {}
|
||||
}
|
||||
|
||||
<!DEPRECATED_UNESCAPED_ANNOTATION!>Ann<!> object O3 {}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package
|
||||
|
||||
Ann() public final class A {
|
||||
Ann() public constructor A(/*0*/ Ann() prop: kotlin.Int)
|
||||
public final val prop: kotlin.Int
|
||||
Ann() public final val x: kotlin.Int = 1
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
Ann() public final fun foo(/*0*/ Ann() x: kotlin.Int): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
Ann() public object O1 {
|
||||
private constructor O1()
|
||||
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
|
||||
}
|
||||
|
||||
Ann() public companion object O2 {
|
||||
private constructor O2()
|
||||
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() public final class Ann : kotlin.Annotation {
|
||||
public constructor Ann(/*0*/ arg: kotlin.Int = ...)
|
||||
public final val arg: 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
|
||||
}
|
||||
|
||||
Ann() public object O3 {
|
||||
private constructor O3()
|
||||
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
|
||||
}
|
||||
@@ -3,6 +3,6 @@ annotation class DocAnn
|
||||
|
||||
annotation class NotDocAnn
|
||||
|
||||
DocAnn class My
|
||||
@DocAnn class My
|
||||
|
||||
NotDocAnn class Your
|
||||
@NotDocAnn class Your
|
||||
|
||||
@@ -13,8 +13,8 @@ public class DocumentedAnnotations {
|
||||
|
||||
// FILE: DocumentedAnnotations.kt
|
||||
|
||||
DocumentedAnnotations.DocAnn class My
|
||||
@DocumentedAnnotations.DocAnn class My
|
||||
|
||||
DocumentedAnnotations.NotDocAnn class Your
|
||||
@DocumentedAnnotations.NotDocAnn class Your
|
||||
|
||||
DocumentedAnnotations.RunDocAnn class His
|
||||
@DocumentedAnnotations.RunDocAnn class His
|
||||
|
||||
@@ -26,10 +26,10 @@ public class AnnotationRetentions {
|
||||
|
||||
// FILE: AnnotationRetentions.kt
|
||||
|
||||
AnnotationRetentions.BaseAnnotation class BaseClass
|
||||
@AnnotationRetentions.BaseAnnotation class BaseClass
|
||||
|
||||
AnnotationRetentions.SourceAnnotation class SourceClass
|
||||
@AnnotationRetentions.SourceAnnotation class SourceClass
|
||||
|
||||
AnnotationRetentions.BinaryAnnotation class BinaryClass
|
||||
@AnnotationRetentions.BinaryAnnotation class BinaryClass
|
||||
|
||||
AnnotationRetentions.RuntimeAnnotation class RuntimeClass
|
||||
@AnnotationRetentions.RuntimeAnnotation class RuntimeClass
|
||||
|
||||
@@ -17,13 +17,13 @@ annotation class binrepann
|
||||
@Repeatable
|
||||
annotation class repexpr
|
||||
|
||||
repann <!NON_SOURCE_REPEATED_ANNOTATION!>repann<!> class DoubleAnnotated
|
||||
@repann <!NON_SOURCE_REPEATED_ANNOTATION!>@repann<!> class DoubleAnnotated
|
||||
|
||||
repann1(1) repann1(2) repann1(3) class TripleAnnotated
|
||||
@repann1(1) @repann1(2) @repann1(3) class TripleAnnotated
|
||||
|
||||
repann2(true) repann2(false) repann2(false) repann2(true) class FourTimesAnnotated
|
||||
@repann2(true) @repann2(false) @repann2(false) @repann2(true) class FourTimesAnnotated
|
||||
|
||||
binrepann <!NON_SOURCE_REPEATED_ANNOTATION!>binrepann<!> class BinaryAnnotated
|
||||
@binrepann <!NON_SOURCE_REPEATED_ANNOTATION!>@binrepann<!> class BinaryAnnotated
|
||||
|
||||
@repann <!NON_SOURCE_REPEATED_ANNOTATION!>@repann<!> fun foo(@repann <!NON_SOURCE_REPEATED_ANNOTATION!>@repann<!> x: Int): Int {
|
||||
@repexpr <!NON_SOURCE_REPEATED_ANNOTATION!>@repexpr<!> return x
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
annotation class sourceann
|
||||
|
||||
sourceann class AnnotatedAtSource
|
||||
@sourceann class AnnotatedAtSource
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@Target(AnnotationTarget.CLASSIFIER)
|
||||
annotation class base
|
||||
|
||||
base data class My
|
||||
@base data class My
|
||||
|
||||
|
||||
+2
-2
@@ -8,9 +8,9 @@ annotation class smartset
|
||||
annotation class base
|
||||
|
||||
class My(x: Int) {
|
||||
smartget var y = x
|
||||
@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
|
||||
@base <!WRONG_ANNOTATION_TARGET!>@smartget<!> <!WRONG_ANNOTATION_TARGET!>@smartset<!> fun foo() = y
|
||||
}
|
||||
|
||||
+7
-7
@@ -1,20 +1,20 @@
|
||||
@Target(AnnotationTarget.ANNOTATION_CLASS) annotation class base
|
||||
|
||||
base annotation class derived
|
||||
@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<!> 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<!> 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<!> 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
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> val z = 0
|
||||
|
||||
+7
-7
@@ -1,21 +1,21 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
@Target(AnnotationTarget.CLASSIFIER) annotation class base
|
||||
|
||||
base annotation class derived
|
||||
@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 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() {
|
||||
@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<!> 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
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> val z = 0
|
||||
|
||||
+7
-7
@@ -1,20 +1,20 @@
|
||||
@Target(AnnotationTarget.CONSTRUCTOR) annotation class base
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> annotation class derived
|
||||
<!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<!> 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<!> 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<!> 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
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> val z = 0
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
@Target() annotation class empty
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>empty<!> annotation class derived
|
||||
<!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<!> 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<!> 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<!> 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
|
||||
<!WRONG_ANNOTATION_TARGET!>@empty<!> val z = <!WRONG_ANNOTATION_TARGET!>@empty<!> 0
|
||||
|
||||
@@ -4,7 +4,7 @@ annotation class base
|
||||
|
||||
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 {
|
||||
@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 })
|
||||
|
||||
@@ -12,7 +12,7 @@ annotation class common
|
||||
|
||||
package test
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>special<!> class Incorrect
|
||||
<!WRONG_ANNOTATION_TARGET!>@special<!> class Incorrect
|
||||
|
||||
// FILE: another.kt
|
||||
|
||||
@@ -20,4 +20,4 @@ package test
|
||||
|
||||
package test
|
||||
|
||||
common class Correct
|
||||
@common class Correct
|
||||
|
||||
+8
-8
@@ -1,22 +1,22 @@
|
||||
@Target(AnnotationTarget.FUNCTION) annotation class base
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> annotation class derived
|
||||
<!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<!> class correct(<!WRONG_ANNOTATION_TARGET!>@base<!> val x: Int) {
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> constructor(): this(0)
|
||||
|
||||
base public fun baz() {}
|
||||
@base public fun baz() {}
|
||||
}
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> enum class My <!WRONG_ANNOTATION_TARGET!>@base<!> constructor() {
|
||||
<!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
|
||||
@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
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> val z = 0
|
||||
+7
-7
@@ -1,21 +1,21 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
@Target(AnnotationTarget.<!UNRESOLVED_REFERENCE!>INIT<!>) annotation class incorrect
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>incorrect<!> annotation class derived
|
||||
<!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<!> 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<!> 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<!> 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
|
||||
<!WRONG_ANNOTATION_TARGET!>@incorrect<!> val z = <!WRONG_ANNOTATION_TARGET!>@incorrect<!> 0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
annotation class base
|
||||
|
||||
base class My {
|
||||
@base class My {
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> init {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,16 +60,16 @@ package test
|
||||
|
||||
import test.AnnotationTargets.*
|
||||
|
||||
base meta type <!WRONG_ANNOTATION_TARGET!>konstructor<!> annotation class KMeta
|
||||
@base @meta @type <!WRONG_ANNOTATION_TARGET!>@konstructor<!> annotation class KMeta
|
||||
|
||||
base <!WRONG_ANNOTATION_TARGET!>meta<!> type <!WRONG_ANNOTATION_TARGET!>method<!> <!WRONG_ANNOTATION_TARGET!>multiple<!> class KClass(
|
||||
@base <!WRONG_ANNOTATION_TARGET!>@meta<!> @type <!WRONG_ANNOTATION_TARGET!>@method<!> <!WRONG_ANNOTATION_TARGET!>@multiple<!> class KClass(
|
||||
@base @fieldann @parameter val y:
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> <!WRONG_ANNOTATION_TARGET!>@type<!> Int) {
|
||||
|
||||
base multiple fieldann <!WRONG_ANNOTATION_TARGET!>local<!> val x = 0
|
||||
@base @multiple @fieldann <!WRONG_ANNOTATION_TARGET!>@local<!> val x = 0
|
||||
@method <!WRONG_ANNOTATION_TARGET!>@konstructor<!> <!WRONG_ANNOTATION_TARGET!>@type<!> get
|
||||
|
||||
base method multiple <!WRONG_ANNOTATION_TARGET!>konstructor<!>
|
||||
@base @method @multiple <!WRONG_ANNOTATION_TARGET!>@konstructor<!>
|
||||
fun foo(@parameter <!WRONG_ANNOTATION_TARGET!>@type<!> i:
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> <!WRONG_ANNOTATION_TARGET!>@multiple<!> Int
|
||||
): <!WRONG_ANNOTATION_TARGET!>@fieldann<!> <!WRONG_ANNOTATION_TARGET!>@parameter<!> Int {
|
||||
@@ -78,5 +78,5 @@ base <!WRONG_ANNOTATION_TARGET!>meta<!> type <!WRONG_ANNOTATION_TARGET!>method<!
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> <!WRONG_ANNOTATION_TARGET!>@multiple<!> return j
|
||||
}
|
||||
|
||||
base <!WRONG_ANNOTATION_TARGET!>method<!> konstructor constructor(): this(0)
|
||||
@base <!WRONG_ANNOTATION_TARGET!>@method<!> @konstructor constructor(): this(0)
|
||||
}
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
@Target(AnnotationTarget.LOCAL_VARIABLE) annotation class base
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> annotation class derived
|
||||
<!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<!> 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<!> 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<!> 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
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> val z = 0
|
||||
|
||||
@@ -4,10 +4,10 @@ annotation class base
|
||||
@Target(AnnotationTarget.ANNOTATION_CLASS)
|
||||
annotation class meta
|
||||
|
||||
base class Outer {
|
||||
base <!WRONG_ANNOTATION_TARGET!>meta<!> class Nested
|
||||
@base class Outer {
|
||||
@base <!WRONG_ANNOTATION_TARGET!>@meta<!> class Nested
|
||||
|
||||
base meta annotation class Annotated
|
||||
@base @meta annotation class Annotated
|
||||
|
||||
fun foo() {
|
||||
@base <!WRONG_ANNOTATION_TARGET!>@meta<!> class Local
|
||||
|
||||
+7
-7
@@ -1,21 +1,21 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
@Target(AnnotationTarget.PROPERTY) annotation class base
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> annotation class derived
|
||||
<!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<!> 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 {
|
||||
<!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<!> 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
|
||||
@base val z = 0
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ 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) {
|
||||
@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
|
||||
}
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
@Target(AnnotationTarget.TYPE) annotation class base
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> annotation class derived
|
||||
<!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<!> 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<!> 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<!> 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
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> val z = 0
|
||||
|
||||
+7
-7
@@ -1,21 +1,21 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
@Target(AnnotationTarget.VALUE_PARAMETER) annotation class base
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> annotation class derived
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> annotation class derived
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> class correct(base val x: Int, base w: Int) {
|
||||
<!WRONG_ANNOTATION_TARGET!>base<!> constructor(): this(0, 0)
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> class correct(@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<!> 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<!> 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
|
||||
<!WRONG_ANNOTATION_TARGET!>@base<!> val z = 0
|
||||
|
||||
@@ -2,12 +2,12 @@ annotation class unrepann(val x: Int)
|
||||
|
||||
annotation class ann(val y: Int)
|
||||
|
||||
unrepann(1) <!REPEATED_ANNOTATION!>unrepann(2)<!> class DoubleAnnotated
|
||||
@unrepann(1) <!REPEATED_ANNOTATION!>@unrepann(2)<!> class DoubleAnnotated
|
||||
|
||||
ann(3) <!REPEATED_ANNOTATION!>ann(7)<!> <!REPEATED_ANNOTATION!>ann(42)<!> class TripleAnnotated
|
||||
@ann(3) <!REPEATED_ANNOTATION!>@ann(7)<!> <!REPEATED_ANNOTATION!>@ann(42)<!> class TripleAnnotated
|
||||
|
||||
@Target(AnnotationTarget.EXPRESSION) annotation class annexpr
|
||||
|
||||
ann(0) <!REPEATED_ANNOTATION!>ann(1)<!> fun foo(@ann(7) <!REPEATED_ANNOTATION!>@ann(2)<!> x: Int): Int {
|
||||
@ann(0) <!REPEATED_ANNOTATION!>@ann(1)<!> fun foo(@ann(7) <!REPEATED_ANNOTATION!>@ann(2)<!> x: Int): Int {
|
||||
@annexpr <!REPEATED_ANNOTATION!>@annexpr<!> return x
|
||||
}
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
<!UNRESOLVED_REFERENCE!>@Ann<!> class A
|
||||
<!UNRESOLVED_REFERENCE!>Ann<!> class B
|
||||
<!UNRESOLVED_REFERENCE!>@Ann<!>(1) class C
|
||||
<!UNRESOLVED_REFERENCE!>@Ann<!> class B
|
||||
<!UNRESOLVED_REFERENCE!>@Ann<!>(1) class C
|
||||
+2
-2
@@ -6,14 +6,14 @@ interface B
|
||||
<!FUNCTION_DECLARATION_WITH_NO_NAME, CONFLICTING_OVERLOADS!>fun ()<!> {}
|
||||
<!FUNCTION_DECLARATION_WITH_NO_NAME, CONFLICTING_OVERLOADS!>fun A.()<!> {}
|
||||
|
||||
<!FUNCTION_DECLARATION_WITH_NO_NAME, CONFLICTING_OVERLOADS!>a fun ()<!> {}
|
||||
<!FUNCTION_DECLARATION_WITH_NO_NAME, CONFLICTING_OVERLOADS!>@a fun ()<!> {}
|
||||
<!FUNCTION_DECLARATION_WITH_NO_NAME, CONFLICTING_OVERLOADS!>fun @a A.()<!> {}
|
||||
|
||||
class Outer {
|
||||
<!FUNCTION_DECLARATION_WITH_NO_NAME, CONFLICTING_OVERLOADS!>fun ()<!> {}
|
||||
<!FUNCTION_DECLARATION_WITH_NO_NAME!>fun B.()<!> {}
|
||||
|
||||
<!FUNCTION_DECLARATION_WITH_NO_NAME, CONFLICTING_OVERLOADS!>a fun ()<!> {}
|
||||
<!FUNCTION_DECLARATION_WITH_NO_NAME, CONFLICTING_OVERLOADS!>@a fun ()<!> {}
|
||||
<!FUNCTION_DECLARATION_WITH_NO_NAME!>fun @a A.()<!> {}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
Deprecated("text")
|
||||
@Deprecated("text")
|
||||
annotation class obsolete()
|
||||
|
||||
Deprecated("text")
|
||||
@Deprecated("text")
|
||||
annotation class obsoleteWithParam(val text: String)
|
||||
|
||||
<!DEPRECATED_SYMBOL_WITH_MESSAGE!>obsolete<!> class Obsolete
|
||||
@<!DEPRECATED_SYMBOL_WITH_MESSAGE!>obsolete<!> class Obsolete
|
||||
|
||||
<!DEPRECATED_SYMBOL_WITH_MESSAGE!>obsoleteWithParam<!>("text") class Obsolete2
|
||||
@<!DEPRECATED_SYMBOL_WITH_MESSAGE!>obsoleteWithParam<!>("text") class Obsolete2
|
||||
@@ -1,7 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE
|
||||
|
||||
class Data {
|
||||
Deprecated("text")
|
||||
@Deprecated("text")
|
||||
fun component1(): String = throw Exception()
|
||||
fun component2(): String = throw Exception()
|
||||
}
|
||||
|
||||
@@ -4,15 +4,15 @@ class UsefulClass(val param: Int = 2) {
|
||||
fun get(instance: Any, property: PropertyMetadata) : Int = 1
|
||||
fun set(instance: Any, property: PropertyMetadata, value: Int) {}
|
||||
|
||||
Deprecated("message")
|
||||
@Deprecated("message")
|
||||
fun member() {}
|
||||
}
|
||||
|
||||
Deprecated("message")
|
||||
@Deprecated("message")
|
||||
fun Obsolete(param: Int = 1): UsefulClass = UsefulClass(param)
|
||||
|
||||
class Invocable {
|
||||
Deprecated("message")
|
||||
@Deprecated("message")
|
||||
fun invoke() {}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ class Initializer {
|
||||
val x = <!DEPRECATED_SYMBOL_WITH_MESSAGE!>Obsolete<!>()
|
||||
}
|
||||
|
||||
Deprecated("does nothing good")
|
||||
@Deprecated("does nothing good")
|
||||
fun Any.doNothing() = this.toString() // "this" should not be marked as deprecated despite it referes to deprecated function
|
||||
|
||||
class Delegation {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION, -UNUSED_PARAMETER
|
||||
|
||||
open class C<T>() {
|
||||
Deprecated("")
|
||||
@Deprecated("")
|
||||
constructor(p: Int) : this(){}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import <!DEPRECATED_SYMBOL_WITH_MESSAGE!>C<!> as C2
|
||||
|
||||
Deprecated("obsolete")
|
||||
@Deprecated("obsolete")
|
||||
class C {
|
||||
fun use() {}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class Iter {
|
||||
Deprecated("text")
|
||||
@Deprecated("text")
|
||||
fun iterator() : IterIterator = throw Exception()
|
||||
|
||||
class IterIterator {
|
||||
@@ -11,9 +11,9 @@ class Iter {
|
||||
class Iter2 {
|
||||
fun iterator() : Iter2Iterator = throw Exception()
|
||||
class Iter2Iterator {
|
||||
Deprecated("text")
|
||||
@Deprecated("text")
|
||||
fun hasNext(): Boolean = throw UnsupportedOperationException()
|
||||
Deprecated("text")
|
||||
@Deprecated("text")
|
||||
fun next(): String = throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class TopLevel {
|
||||
Deprecated("Nested")
|
||||
@Deprecated("Nested")
|
||||
class Nested {
|
||||
companion object {
|
||||
fun use() {}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
Deprecated("Object")
|
||||
@Deprecated("Object")
|
||||
object Obsolete {
|
||||
fun use() {}
|
||||
}
|
||||
|
||||
class Another {
|
||||
Deprecated("Object")
|
||||
@Deprecated("Object")
|
||||
companion object {
|
||||
fun use() {}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
|
||||
class Delegate() {
|
||||
Deprecated("text")
|
||||
@Deprecated("text")
|
||||
fun get(instance: Any, property: PropertyMetadata) : Int = 1
|
||||
|
||||
Deprecated("text")
|
||||
@Deprecated("text")
|
||||
fun set(instance: Any, property: PropertyMetadata, value: Int) {}
|
||||
}
|
||||
|
||||
class PropertyHolder {
|
||||
Deprecated("text")
|
||||
@Deprecated("text")
|
||||
val x = 1
|
||||
|
||||
Deprecated("text")
|
||||
@Deprecated("text")
|
||||
var name = "String"
|
||||
|
||||
val valDelegate <!DEPRECATED_SYMBOL_WITH_MESSAGE!>by<!> Delegate()
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
|
||||
class PropertyHolder {
|
||||
Deprecated("")
|
||||
@Deprecated("")
|
||||
val a1 = 1
|
||||
|
||||
@property:Deprecated("")
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
Deprecated("Class")
|
||||
@Deprecated("Class")
|
||||
open class Obsolete {
|
||||
fun use() {}
|
||||
}
|
||||
|
||||
Deprecated("Class")
|
||||
open class Obsolete2 Deprecated("Constructor") constructor() {
|
||||
@Deprecated("Class")
|
||||
open class Obsolete2 @Deprecated("Constructor") constructor() {
|
||||
fun use() {}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ enum class E {
|
||||
<!WRONG_MODIFIER_TARGET!>final<!> FINAL,
|
||||
|
||||
<!WRONG_MODIFIER_TARGET!>inner<!> INNER,
|
||||
<!WRONG_ANNOTATION_TARGET!>@annotation<!> ANNOTATION,
|
||||
<!WRONG_MODIFIER_TARGET!>annotation<!> ANNOTATION,
|
||||
<!WRONG_MODIFIER_TARGET!>enum<!> ENUM,
|
||||
<!WRONG_MODIFIER_TARGET!>out<!> OUT,
|
||||
<!WRONG_MODIFIER_TARGET!>in<!> IN,
|
||||
|
||||
@@ -12,6 +12,6 @@ val a8 = 1.div(a2)
|
||||
val a9 = 2 * (<!DIVISION_BY_ZERO!>1.div(0)<!>)
|
||||
|
||||
val b1: Byte = <!DIVISION_BY_ZERO, TYPE_MISMATCH!>1 / 0<!>
|
||||
Ann(<!DIVISION_BY_ZERO, ANNOTATION_PARAMETER_MUST_BE_CONST!>1 / 0<!>) val b2 = 1
|
||||
@Ann(<!DIVISION_BY_ZERO, ANNOTATION_PARAMETER_MUST_BE_CONST!>1 / 0<!>) val b2 = 1
|
||||
|
||||
annotation class Ann(val i : Int)
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
fun main(args: Array<String>) {
|
||||
<!NOT_YET_SUPPORTED_IN_INLINE!>@inline fun a(){
|
||||
<!NOT_YET_SUPPORTED_IN_INLINE!>inline fun a(){
|
||||
}<!>
|
||||
}
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -NOTHING_TO_INLINE
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun <R> inlineFunOnlyLocal(inlineOptions(ONLY_LOCAL_RETURN)p: () -> R) {
|
||||
inline fun <R> inlineFunOnlyLocal(@inlineOptions(ONLY_LOCAL_RETURN)p: () -> R) {
|
||||
val s = object {
|
||||
|
||||
val z = p()
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -NOTHING_TO_INLINE
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun <R> inlineFunOnlyLocal(inlineOptions(ONLY_LOCAL_RETURN)p: () -> R) {
|
||||
inline fun <R> inlineFunOnlyLocal(@inlineOptions(ONLY_LOCAL_RETURN)p: () -> R) {
|
||||
val s = object {
|
||||
|
||||
val z = p();
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun <R> onlyLocal(inlineOptions(ONLY_LOCAL_RETURN)p: () -> R) {
|
||||
inline fun <R> onlyLocal(@inlineOptions(ONLY_LOCAL_RETURN)p: () -> R) {
|
||||
inlineAll(p)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun <R> inlineFunWithAnnotation(inlineOptions(ONLY_LOCAL_RETURN) p: () -> R) {
|
||||
inline fun <R> inlineFunWithAnnotation(@inlineOptions(ONLY_LOCAL_RETURN) p: () -> R) {
|
||||
inlineFun {
|
||||
p()
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,6 +5,6 @@ inline fun testSameCaptured(lambdaWithResultCaptured: () -> Unit) : String {
|
||||
return "OK"
|
||||
}
|
||||
|
||||
inline fun <R> doWork(inlineOptions(ONLY_LOCAL_RETURN) job: ()-> R) : R {
|
||||
inline fun <R> doWork(@inlineOptions(ONLY_LOCAL_RETURN) job: ()-> R) : R {
|
||||
return job()
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -NOTHING_TO_INLINE
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun <R> inlineFunOnlyLocal(inlineOptions(ONLY_LOCAL_RETURN)p: () -> R) {
|
||||
inline fun <R> inlineFunOnlyLocal(@inlineOptions(ONLY_LOCAL_RETURN)p: () -> R) {
|
||||
<!NOT_YET_SUPPORTED_IN_INLINE!>fun a() {
|
||||
val z = p()
|
||||
}<!>
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -NOTHING_TO_INLINE
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun <R> inlineFunOnlyLocal(inlineOptions(ONLY_LOCAL_RETURN)p: () -> R) {
|
||||
inline fun <R> inlineFunOnlyLocal(@inlineOptions(ONLY_LOCAL_RETURN)p: () -> R) {
|
||||
{
|
||||
p()
|
||||
}()
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -NOTHING_TO_INLINE
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun <R> inlineFunOnlyLocal(inlineOptions(ONLY_LOCAL_RETURN)p: () -> R) {
|
||||
inline fun <R> inlineFunOnlyLocal(@inlineOptions(ONLY_LOCAL_RETURN)p: () -> R) {
|
||||
<!NOT_YET_SUPPORTED_IN_INLINE!>class A {
|
||||
|
||||
val z = p()
|
||||
|
||||
+1
-1
@@ -39,6 +39,6 @@ fun <R> fun4ValueArgument(p: () -> R) {
|
||||
}
|
||||
|
||||
|
||||
inline fun <R> inlineFun(inlineOptions(ONLY_LOCAL_RETURN) p: () -> R) {
|
||||
inline fun <R> inlineFun(@inlineOptions(ONLY_LOCAL_RETURN) p: () -> R) {
|
||||
p()
|
||||
}
|
||||
Vendored
+1
-1
@@ -2,7 +2,7 @@
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
class Z {
|
||||
inline fun <R> inlineFun(inlineOptions(ONLY_LOCAL_RETURN) p: () -> R) {
|
||||
inline fun <R> inlineFun(@inlineOptions(ONLY_LOCAL_RETURN) p: () -> R) {
|
||||
p()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun <R> toOnlyLocal(inlineOptions(ONLY_LOCAL_RETURN) p: () -> R) {
|
||||
inline fun <R> toOnlyLocal(@inlineOptions(ONLY_LOCAL_RETURN) p: () -> R) {
|
||||
p()
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ public fun test() {
|
||||
}
|
||||
}
|
||||
|
||||
<!NOT_YET_SUPPORTED_IN_INLINE!>@inline fun localFun2() {
|
||||
<!NOT_YET_SUPPORTED_IN_INLINE!>inline fun localFun2() {
|
||||
Z().localFun()
|
||||
}<!>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ public fun test() {
|
||||
|
||||
}
|
||||
|
||||
<!NOT_YET_SUPPORTED_IN_INLINE!>@inline fun localFun2() {
|
||||
<!NOT_YET_SUPPORTED_IN_INLINE!>inline fun localFun2() {
|
||||
localFun()
|
||||
}<!>
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ class FinalClass() {
|
||||
annotation class annotated(val text: String = "not given")
|
||||
|
||||
//Check legal modifiers in constructor
|
||||
class LegalModifier(val a: Int, annotated private var b: String, annotated vararg <!UNUSED_PARAMETER!>v<!>: Int)
|
||||
class LegalModifier(val a: Int, @annotated private var b: String, @annotated vararg <!UNUSED_PARAMETER!>v<!>: Int)
|
||||
|
||||
//Check illegal modifier in constructor parameters
|
||||
class IllegalModifiers1(
|
||||
@@ -43,10 +43,10 @@ class IllegalModifiers2(<!WRONG_MODIFIER_TARGET!>private<!> <!WRONG_MODIFIER_TAR
|
||||
|
||||
|
||||
//Check annotations with illegal modifiers in constructor
|
||||
class IllegalModifiers3(annotated <!WRONG_MODIFIER_TARGET!>public<!> <!WRONG_MODIFIER_TARGET!>abstract<!> <!UNUSED_PARAMETER!>b<!>: String)
|
||||
class IllegalModifiers3(@annotated <!WRONG_MODIFIER_TARGET!>public<!> <!WRONG_MODIFIER_TARGET!>abstract<!> <!UNUSED_PARAMETER!>b<!>: String)
|
||||
|
||||
//Check annotations and vararg with illegal modifiers in constructor
|
||||
class IllegalModifiers4(val a: Int, annotated("a text") <!WRONG_MODIFIER_TARGET!>protected<!> vararg <!UNUSED_PARAMETER!>v<!>: Int)
|
||||
class IllegalModifiers4(val a: Int, @annotated("a text") <!WRONG_MODIFIER_TARGET!>protected<!> vararg <!UNUSED_PARAMETER!>v<!>: Int)
|
||||
|
||||
//Check illegal modifiers for functions and catch block
|
||||
abstract class IllegalModifiers5() {
|
||||
@@ -58,7 +58,7 @@ abstract class IllegalModifiers5() {
|
||||
abstract fun bar(<!WRONG_MODIFIER_TARGET!>public<!> <!WRONG_MODIFIER_TARGET!>abstract<!> a: Int, vararg v: String)
|
||||
|
||||
//Check annotations with illegal modifiers
|
||||
abstract fun baz(annotated("a text") <!WRONG_MODIFIER_TARGET!>public<!> <!WRONG_MODIFIER_TARGET!>abstract<!> a: Int)
|
||||
abstract fun baz(@annotated("a text") <!WRONG_MODIFIER_TARGET!>public<!> <!WRONG_MODIFIER_TARGET!>abstract<!> a: Int)
|
||||
|
||||
private fun qux() {
|
||||
|
||||
@@ -69,7 +69,7 @@ abstract class IllegalModifiers5() {
|
||||
try {} catch (<!WRONG_MODIFIER_TARGET!>in<!> <!INCOMPATIBLE_MODIFIERS!>out<!> <!WRONG_MODIFIER_TARGET!>reified<!> <!WRONG_MODIFIER_TARGET!>enum<!> <!WRONG_MODIFIER_TARGET!>abstract<!> <!WRONG_MODIFIER_TARGET!>public<!> e: Exception) {}
|
||||
|
||||
//Check annotations with illegal modifiers
|
||||
try {} catch (annotated("a text") <!WRONG_MODIFIER_TARGET!>abstract<!> <!WRONG_MODIFIER_TARGET!>public<!> e: Exception) {}
|
||||
try {} catch (@annotated("a text") <!WRONG_MODIFIER_TARGET!>abstract<!> <!WRONG_MODIFIER_TARGET!>public<!> e: Exception) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
annotation class Ann(val x: Int = 1)
|
||||
class A <!MISSING_CONSTRUCTOR_KEYWORD!>private<!> (val x: Int) {
|
||||
inner class B <!MISSING_CONSTRUCTOR_KEYWORD!>Ann(2)<!> (val y: Int)
|
||||
inner class B <!MISSING_CONSTRUCTOR_KEYWORD!>@Ann(2)<!> (val y: Int)
|
||||
|
||||
fun foo() {
|
||||
class C <!MISSING_CONSTRUCTOR_KEYWORD!>private @Ann(3)<!> (args: Int)
|
||||
|
||||
+1
-1
@@ -8,5 +8,5 @@ public @interface A {
|
||||
|
||||
// FILE: 1.kt
|
||||
|
||||
A(x = 1, y = "2")
|
||||
@A(x = 1, y = "2")
|
||||
fun test() {}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// !DIAGNOSTICS: -FUNCTION_DECLARATION_WITH_NO_NAME
|
||||
class ClassB() {
|
||||
private inner class ClassC: <!SYNTAX!>super<!><!SYNTAX!>.<!><!UNRESOLVED_REFERENCE!>ClassA<!>()<!SYNTAX!><!> {
|
||||
private inner class ClassC: <!SYNTAX!>super<!><!SYNTAX!>.<!><!UNRESOLVED_REFERENCE!>@ClassA<!>()<!SYNTAX!><!> {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
// !DIAGNOSTICS: -NO_VALUE_FOR_PARAMETER
|
||||
class Tree<T>(<!NOT_A_CLASS!>T<!> element<!SYNTAX!><!>, <!NOT_AN_ANNOTATION_CLASS!>Tree<T><!> left<!SYNTAX!><!>, <!NOT_AN_ANNOTATION_CLASS!>Tree<T><!> right<!SYNTAX!><!>) {}
|
||||
class Tree<T>(<!NOT_A_CLASS, DEPRECATED_UNESCAPED_ANNOTATION!>T<!> element<!SYNTAX!><!>, <!NOT_AN_ANNOTATION_CLASS, DEPRECATED_UNESCAPED_ANNOTATION!>Tree<T><!> left<!SYNTAX!><!>, <!NOT_AN_ANNOTATION_CLASS, DEPRECATED_UNESCAPED_ANNOTATION!>Tree<T><!> right<!SYNTAX!><!>) {}
|
||||
+6
-3
@@ -3,7 +3,10 @@ annotation class Ann1
|
||||
annotation class Ann2(val x: Int)
|
||||
|
||||
class A {
|
||||
Ann1 constructor()
|
||||
<!NO_VALUE_FOR_PARAMETER!>Ann2<!> constructor(x1: Int)
|
||||
Ann2(2) constructor(x1: Int, x2: Int)
|
||||
@Ann1
|
||||
constructor()
|
||||
@<!NO_VALUE_FOR_PARAMETER!>Ann2<!>
|
||||
constructor(x1: Int)
|
||||
@Ann2(2)
|
||||
constructor(x1: Int, x2: Int)
|
||||
}
|
||||
Vendored
+12
-12
@@ -3,46 +3,46 @@
|
||||
fun foo() {
|
||||
@native
|
||||
class A {
|
||||
nativeGetter
|
||||
@nativeGetter
|
||||
fun get(a: String): Any? = null
|
||||
|
||||
nativeGetter
|
||||
@nativeGetter
|
||||
fun take(a: Number): String? = null
|
||||
|
||||
nativeGetter
|
||||
@nativeGetter
|
||||
fun foo(a: Double): String? = null
|
||||
}
|
||||
|
||||
@native
|
||||
class B {
|
||||
<!WRONG_ANNOTATION_TARGET!>nativeGetter<!>
|
||||
<!WRONG_ANNOTATION_TARGET!>@nativeGetter<!>
|
||||
val foo = 0
|
||||
}
|
||||
|
||||
@native
|
||||
class C {
|
||||
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>nativeGetter
|
||||
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>@nativeGetter
|
||||
fun Int.get(a: String): Int?<!> = 1
|
||||
|
||||
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>nativeGetter
|
||||
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>@nativeGetter
|
||||
fun Int.get2(a: Number): String?<!> = "OK"
|
||||
|
||||
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>nativeGetter
|
||||
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>@nativeGetter
|
||||
fun Int.get3(a: Int): String?<!> = "OK"
|
||||
|
||||
<!NATIVE_INDEXER_WRONG_PARAMETER_COUNT!>nativeGetter
|
||||
<!NATIVE_INDEXER_WRONG_PARAMETER_COUNT!>@nativeGetter
|
||||
fun get(): Any?<!> = null
|
||||
|
||||
nativeGetter
|
||||
@nativeGetter
|
||||
fun get(<!NATIVE_INDEXER_KEY_SHOULD_BE_STRING_OR_NUMBER!>a: A<!>): Any? = null
|
||||
|
||||
nativeGetter
|
||||
@nativeGetter
|
||||
fun <!NATIVE_GETTER_RETURN_TYPE_SHOULD_BE_NULLABLE!>foo<!>(a: Int) {}
|
||||
|
||||
nativeGetter
|
||||
@nativeGetter
|
||||
fun bar(a: String): <!NATIVE_GETTER_RETURN_TYPE_SHOULD_BE_NULLABLE!>Int<!> = 0
|
||||
|
||||
nativeGetter
|
||||
@nativeGetter
|
||||
fun baz(<!NATIVE_INDEXER_CAN_NOT_HAVE_DEFAULT_ARGUMENTS!>a: String = "foo"<!>): Int? = 0
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user