Update testdata according to change compiler version to 1.4
This commit is contained in:
@@ -11,7 +11,7 @@ public final class foo/Kotlin$Companion : java/lang/Object {
|
||||
@Lfoo/TypeAnn;([name="1"]) : METHOD_RETURN, null
|
||||
@Lfoo/TypeAnnBinary;([]) : METHOD_RETURN, null // invisible
|
||||
|
||||
public static void jvmStatic$annotations()
|
||||
public static void getJvmStatic$annotations()
|
||||
|
||||
public final void setCompanionVarProperty(java.lang.String <set-?>)
|
||||
@Lfoo/TypeAnn;([name="1"]) : METHOD_FORMAL_PARAMETER 0, null
|
||||
|
||||
+3
-3
@@ -22,7 +22,7 @@ final class TestPrivateCompanionInClass$Companion {
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class TestPrivateCompanionInClass {
|
||||
public deprecated final static @java.lang.Deprecated field Companion: TestPrivateCompanionInClass$Companion
|
||||
private final static field Companion: TestPrivateCompanionInClass$Companion
|
||||
inner class TestPrivateCompanionInClass$Companion
|
||||
static method <clinit>(): void
|
||||
public method <init>(): void
|
||||
@@ -38,7 +38,7 @@ final class TestPrivateCompanionInInterface$Companion {
|
||||
|
||||
@kotlin.Metadata
|
||||
public interface TestPrivateCompanionInInterface {
|
||||
public deprecated final static @java.lang.Deprecated field Companion: TestPrivateCompanionInInterface$Companion
|
||||
public synthetic final static field Companion: TestPrivateCompanionInInterface$Companion
|
||||
inner class TestPrivateCompanionInInterface$Companion
|
||||
static method <clinit>(): void
|
||||
}
|
||||
@@ -52,7 +52,7 @@ public final class TestProtectedCompanionInClass$Companion {
|
||||
|
||||
@kotlin.Metadata
|
||||
public class TestProtectedCompanionInClass {
|
||||
public deprecated final static @java.lang.Deprecated field Companion: TestProtectedCompanionInClass$Companion
|
||||
protected final static field Companion: TestProtectedCompanionInClass$Companion
|
||||
inner class TestProtectedCompanionInClass$Companion
|
||||
static method <clinit>(): void
|
||||
public method <init>(): void
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// !LANGUAGE: -BareArrayClassLiteral -ProhibitGenericArrayClassLiteral
|
||||
|
||||
val a01 = <!ARRAY_CLASS_LITERAL_REQUIRES_ARGUMENT!>Array::class<!>
|
||||
val a02 = Array<<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Array<!>>::class
|
||||
val a03 = Array<Any?>::class
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ inline fun case_2(block: () -> Unit) = <!CONTRACT_NOT_ALLOWED("Contracts are all
|
||||
fun case_3(block: () -> Unit) {
|
||||
class Class {
|
||||
fun innerFun(block2: () -> Unit) {
|
||||
<!CONTRACT_NOT_ALLOWED("Contracts are allowed only for top-level functions")!>contract<!> {
|
||||
<!CONTRACT_NOT_ALLOWED("Contracts are allowed only for functions")!>contract<!> {
|
||||
callsInPlace(block2, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
block2()
|
||||
|
||||
-43
@@ -48,46 +48,3 @@ FILE fqName:<root> fileName:/classLiteralInAnnotation.kt
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
FUN name:test2 visibility:public modality:FINAL <T> () returnType:<uninitialized parent>.<anonymous> [inline]
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun test2 <T> (): <uninitialized parent>.<anonymous> [inline] declared in <root>'
|
||||
BLOCK type=<root>.test2.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS OBJECT name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]
|
||||
annotations:
|
||||
A(klass = CLASS_REFERENCE 'TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]' type=kotlin.reflect.KClass<T of <root>.test2>)
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.test2.<no name provided>
|
||||
CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]'
|
||||
CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.test2.<no name provided>' type=<root>.test2.<no name provided> origin=null
|
||||
PROPERTY name:test3 visibility:public modality:FINAL [var]
|
||||
FUN name:<get-test3> visibility:public modality:FINAL <> () returnType:<uninitialized parent>.<anonymous>
|
||||
correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [var]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test3> (): <uninitialized parent>.<anonymous> declared in <root>'
|
||||
BLOCK type=<root>.<get-test3>.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS OBJECT name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]
|
||||
annotations:
|
||||
A(klass = CLASS_REFERENCE 'TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]' type=kotlin.reflect.KClass<T of <uninitialized parent>>)
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.<get-test3>.<no name provided>
|
||||
CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]'
|
||||
CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.<get-test3>.<no name provided>' type=<root>.<get-test3>.<no name provided> origin=null
|
||||
FUN name:<set-test3> visibility:public modality:FINAL <> (v:<uninitialized parent>.<anonymous>) returnType:kotlin.Unit
|
||||
correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [var]
|
||||
VALUE_PARAMETER name:v index:0 type:<uninitialized parent>.<anonymous>
|
||||
BLOCK_BODY
|
||||
BLOCK type=<root>.<set-test3>.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS OBJECT name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]
|
||||
annotations:
|
||||
A(klass = CLASS_REFERENCE 'TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]' type=kotlin.reflect.KClass<T of <uninitialized parent>>)
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.<set-test3>.<no name provided>
|
||||
CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]'
|
||||
CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.<set-test3>.<no name provided>' type=<root>.<set-test3>.<no name provided> origin=null
|
||||
|
||||
-7
@@ -5,10 +5,3 @@ annotation class A(val klass: KClass<*>)
|
||||
class C
|
||||
|
||||
@A(C::class) fun test1() {}
|
||||
|
||||
inline fun <reified T> test2() =
|
||||
@A(T::class) object {}
|
||||
|
||||
inline var <reified T> T.test3
|
||||
get() = @A(T::class) object {}
|
||||
set(v) { @A(T::class) object {} }
|
||||
-87
@@ -50,90 +50,3 @@ FILE fqName:<root> fileName:/classLiteralInAnnotation.kt
|
||||
annotations:
|
||||
A(klass = CLASS_REFERENCE 'CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.reflect.KClass<<root>.C>)
|
||||
BLOCK_BODY
|
||||
FUN name:test2 visibility:public modality:FINAL <T> () returnType:kotlin.Any [inline]
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun test2 <T> (): kotlin.Any [inline] declared in <root>'
|
||||
BLOCK type=<root>.test2.<no name provided><T of <root>.test2> origin=OBJECT_LITERAL
|
||||
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]
|
||||
annotations:
|
||||
A(klass = CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public superTypes:[]' type=kotlin.reflect.KClass<kotlin.Any>)
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.test2.<no name provided><T of <root>.test2>
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.test2.<no name provided><T of <root>.test2> [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]'
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.test2.<no name provided>' type=<root>.test2.<no name provided><T of <root>.test2> origin=OBJECT_LITERAL
|
||||
PROPERTY name:test3 visibility:public modality:FINAL [var]
|
||||
FUN name:<get-test3> visibility:public modality:FINAL <T> ($receiver:T of <root>.<get-test3>) returnType:kotlin.Any [inline]
|
||||
correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [var]
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
$receiver: VALUE_PARAMETER name:<this> type:T of <root>.<get-test3>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test3> <T> (): kotlin.Any [inline] declared in <root>'
|
||||
BLOCK type=<root>.<get-test3>.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]
|
||||
annotations:
|
||||
A(klass = CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public superTypes:[]' type=kotlin.reflect.KClass<kotlin.Any>)
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.<get-test3>.<no name provided>
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.<get-test3>.<no name provided> [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]'
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.<get-test3>.<no name provided>' type=<root>.<get-test3>.<no name provided> origin=OBJECT_LITERAL
|
||||
FUN name:<set-test3> visibility:public modality:FINAL <T> ($receiver:T of <root>.<set-test3>, v:kotlin.Any) returnType:kotlin.Unit [inline]
|
||||
correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [var]
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
$receiver: VALUE_PARAMETER name:<this> type:T of <root>.<set-test3>
|
||||
VALUE_PARAMETER name:v index:0 type:kotlin.Any
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
BLOCK type=<root>.<set-test3>.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]
|
||||
annotations:
|
||||
A(klass = CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public superTypes:[]' type=kotlin.reflect.KClass<kotlin.Any>)
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.<set-test3>.<no name provided>
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.<set-test3>.<no name provided> [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]'
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.<set-test3>.<no name provided>' type=<root>.<set-test3>.<no name provided> origin=OBJECT_LITERAL
|
||||
|
||||
+16
-16
@@ -18,57 +18,57 @@ annotation class Case12_1
|
||||
annotation class Case12_2
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
annotation class Case1 <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR_WARNING!>@JvmOverloads<!> constructor(val x: Int)
|
||||
annotation class Case1 <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR!>@JvmOverloads<!> constructor(val x: Int)
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
annotation class Case2 @[Case12_2 Case12_2 Case12_2 Case12_2 Case12_2 Case12_2 <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR_WARNING!>JvmOverloads<!> Case12_1] constructor(<!MISSING_VAL_ON_ANNOTATION_PARAMETER!>x: Int = 10<!>)
|
||||
annotation class Case2 @[Case12_2 Case12_2 Case12_2 Case12_2 Case12_2 Case12_2 <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR!>JvmOverloads<!> Case12_1] constructor(<!MISSING_VAL_ON_ANNOTATION_PARAMETER!>x: Int = 10<!>)
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
annotation class Case3 @Case12_2 @Case12_1 @Case12_2 <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR_WARNING!>@`JvmOverloads`<!> @Case12_2 @Case12_2 constructor(<!MISSING_VAL_ON_ANNOTATION_PARAMETER!>x: Int = 10<!>)
|
||||
annotation class Case3 @Case12_2 @Case12_1 @Case12_2 <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR!>@`JvmOverloads`<!> @Case12_2 @Case12_2 constructor(<!MISSING_VAL_ON_ANNOTATION_PARAMETER!>x: Int = 10<!>)
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
annotation class Case4 @Case12_2 @[Case12_2 Case12_2 Case12_2 Case12_2 Case12_2 Case12_2 <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR_WARNING!>JvmOverloads<!> Case12_1] @Case12_2 @Case12_2 constructor(<!MISSING_VAL_ON_ANNOTATION_PARAMETER!>x: Int = 10<!>)
|
||||
annotation class Case4 @Case12_2 @[Case12_2 Case12_2 Case12_2 Case12_2 Case12_2 Case12_2 <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR!>JvmOverloads<!> Case12_1] @Case12_2 @Case12_2 constructor(<!MISSING_VAL_ON_ANNOTATION_PARAMETER!>x: Int = 10<!>)
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
annotation class Case5 @[<!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR_WARNING!>JvmOverloads<!>] constructor(val x: Int)
|
||||
annotation class Case5 @[<!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR!>JvmOverloads<!>] constructor(val x: Int)
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
annotation class Case6 <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR_WARNING!>@JvmOverloads<!> constructor()
|
||||
annotation class Case6 <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR!>@JvmOverloads<!> constructor()
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
annotation class Case7<!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR_WARNING!>@JvmOverloads<!> constructor() {}
|
||||
annotation class Case7<!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR!>@JvmOverloads<!> constructor() {}
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
annotation class Case8 <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR_WARNING!>@`JvmOverloads`<!> constructor()
|
||||
annotation class Case8 <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR!>@`JvmOverloads`<!> constructor()
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
annotation class Case9 <A, Case12_1 : A, Case12_2 : Case12_1, D : Case12_2, E : D> <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR_WARNING!>@JvmOverloads<!> constructor(val x: Int)
|
||||
annotation class Case9 <A, Case12_1 : A, Case12_2 : Case12_1, D : Case12_2, E : D> <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR!>@JvmOverloads<!> constructor(val x: Int)
|
||||
|
||||
// TESTCASE NUMBER: 10
|
||||
annotation class Case10 <T> <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR_WARNING!>@JvmOverloads<!> constructor(val x: Int)
|
||||
annotation class Case10 <T> <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR!>@JvmOverloads<!> constructor(val x: Int)
|
||||
|
||||
// TESTCASE NUMBER: 11
|
||||
annotation class Case11 <T : Number, K : Comparable<K>> <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR_WARNING!>@JvmOverloads<!> constructor(val x: Int)
|
||||
annotation class Case11 <T : Number, K : Comparable<K>> <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR!>@JvmOverloads<!> constructor(val x: Int)
|
||||
|
||||
// TESTCASE NUMBER: 12
|
||||
annotation class Case12 <T> <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR_WARNING!>@JvmOverloads<!> constructor(val x: Int) where T: Number
|
||||
annotation class Case12 <T> <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR!>@JvmOverloads<!> constructor(val x: Int) where T: Number
|
||||
|
||||
// TESTCASE NUMBER: 13
|
||||
annotation class Case13 constructor(val x: Int) {
|
||||
annotation class Case1 <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR_WARNING!>@JvmOverloads<!> constructor(val x: Int)
|
||||
annotation class Case1 <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR!>@JvmOverloads<!> constructor(val x: Int)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 14
|
||||
annotation class Case14 <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR_WARNING!>@JvmOverloads<!> constructor(val x: Int) {
|
||||
annotation class Case14 <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR!>@JvmOverloads<!> constructor(val x: Int) {
|
||||
annotation class Case1 constructor(val x: Int)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 15
|
||||
object Case15 {
|
||||
annotation class Case15 <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR_WARNING!>@JvmOverloads<!> constructor(val x: Int)
|
||||
annotation class Case15 <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR!>@JvmOverloads<!> constructor(val x: Int)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 16
|
||||
class Case16 {
|
||||
annotation class Case16 <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR_WARNING!>@JvmOverloads<!> constructor(val x: Int)
|
||||
annotation class Case16 <!OVERLOADS_ANNOTATION_CLASS_CONSTRUCTOR!>@JvmOverloads<!> constructor(val x: Int)
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ open class Case1<K : Number> {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("L & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.get(0)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("M & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.size
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("M & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.isEmpty()
|
||||
<!TYPE_INFERENCE_ONLY_INPUT_TYPES!><!DEBUG_INFO_EXPRESSION_TYPE("M & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>[null]<!>
|
||||
<!TYPE_INFERENCE_ONLY_INPUT_TYPES_WARNING!><!DEBUG_INFO_EXPRESSION_TYPE("M & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>[null]<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ open class Case1<K : Number> {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("L & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.get(0)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("M & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.size
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("M & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.isEmpty()
|
||||
<!TYPE_INFERENCE_ONLY_INPUT_TYPES!><!DEBUG_INFO_EXPRESSION_TYPE("M & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>[null]<!>
|
||||
<!TYPE_INFERENCE_ONLY_INPUT_TYPES_WARNING!><!DEBUG_INFO_EXPRESSION_TYPE("M & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>[null]<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ open class Case1<K : Number> {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("L & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.get(0)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("M & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.size
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("M & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.isEmpty()
|
||||
<!TYPE_INFERENCE_ONLY_INPUT_TYPES!><!DEBUG_INFO_EXPRESSION_TYPE("M & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>[null]<!>
|
||||
<!TYPE_INFERENCE_ONLY_INPUT_TYPES_WARNING!><!DEBUG_INFO_EXPRESSION_TYPE("M & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>[null]<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+22
-22
@@ -13,32 +13,32 @@
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1() {
|
||||
val <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS_WARNING!><T><!> x1 = 1
|
||||
var <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS_WARNING!><T><!> x2 = 1
|
||||
val <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS!><T><!> x1 = 1
|
||||
var <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS!><T><!> x2 = 1
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2() {
|
||||
val <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS_WARNING!><T><!> x1: Int = 1
|
||||
var <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS_WARNING!><T><!> x2: Int = 1
|
||||
val <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS!><T><!> x1: Int = 1
|
||||
var <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS!><T><!> x2: Int = 1
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3() {
|
||||
val <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS_WARNING!><T><!> x1: Map<Int, Int> = mapOf(1 to 1)
|
||||
var <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS_WARNING!><T><!> x2: Map<Int, Int> = mapOf(1 to 1)
|
||||
val <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS!><T><!> x1: Map<Int, Int> = mapOf(1 to 1)
|
||||
var <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS!><T><!> x2: Map<Int, Int> = mapOf(1 to 1)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4() {
|
||||
val <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS_WARNING!><T><!> y1: Number where <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!>: <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!> = 1
|
||||
var <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS_WARNING!><T><!> y2: Number where <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!>: <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!> = 1
|
||||
val <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS!><T><!> y1: Number where <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!>: <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!> = 1
|
||||
var <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS!><T><!> y2: Number where <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!>: <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!> = 1
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5() {
|
||||
val <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS_WARNING!><T : <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!>><!> x1: Map<Int, Int> = mapOf(1 to 1)
|
||||
var <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS_WARNING!><T : <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!>><!> x2: Map<Int, Int> = mapOf(1 to 1)
|
||||
val <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS!><T : <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!>><!> x1: Map<Int, Int> = mapOf(1 to 1)
|
||||
var <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS!><T : <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!>><!> x2: Map<Int, Int> = mapOf(1 to 1)
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -61,19 +61,19 @@ fun case_7() {
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun case_8() {
|
||||
val <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS_WARNING!><A, B : <!DEBUG_INFO_MISSING_UNRESOLVED!>A<!>, C : <!DEBUG_INFO_MISSING_UNRESOLVED!>B<!>, D : <!DEBUG_INFO_MISSING_UNRESOLVED!>C<!>, E : <!DEBUG_INFO_MISSING_UNRESOLVED!>D<!>><!> x1 = 1
|
||||
var <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS_WARNING!><A, B : <!DEBUG_INFO_MISSING_UNRESOLVED!>A<!>, C : <!DEBUG_INFO_MISSING_UNRESOLVED!>B<!>, D : <!DEBUG_INFO_MISSING_UNRESOLVED!>C<!>, E : <!DEBUG_INFO_MISSING_UNRESOLVED!>D<!>><!> x2 = 2
|
||||
val <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS!><A, B : <!DEBUG_INFO_MISSING_UNRESOLVED!>A<!>, C : <!DEBUG_INFO_MISSING_UNRESOLVED!>B<!>, D : <!DEBUG_INFO_MISSING_UNRESOLVED!>C<!>, E : <!DEBUG_INFO_MISSING_UNRESOLVED!>D<!>><!> x1 = 1
|
||||
var <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS!><A, B : <!DEBUG_INFO_MISSING_UNRESOLVED!>A<!>, C : <!DEBUG_INFO_MISSING_UNRESOLVED!>B<!>, D : <!DEBUG_INFO_MISSING_UNRESOLVED!>C<!>, E : <!DEBUG_INFO_MISSING_UNRESOLVED!>D<!>><!> x2 = 2
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
fun case_9(y: Boolean?) = when (val <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS_WARNING!><T><!> x = y) {
|
||||
fun case_9(y: Boolean?) = when (val <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS!><T><!> x = y) {
|
||||
true -> null
|
||||
false -> null
|
||||
null -> null
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 10
|
||||
fun case_10(x: Boolean?) = when (val <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS_WARNING!><T><!> <!NAME_SHADOWING!>x<!> where <!DEBUG_INFO_MISSING_UNRESOLVED!>T<!>: suspend () -> <!DEBUG_INFO_MISSING_UNRESOLVED!>Unit<!>, <!DEBUG_INFO_MISSING_UNRESOLVED!>T<!>: <!DEBUG_INFO_MISSING_UNRESOLVED!>Boolean<!> = x) {
|
||||
fun case_10(x: Boolean?) = when (val <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS!><T><!> <!NAME_SHADOWING!>x<!> where <!DEBUG_INFO_MISSING_UNRESOLVED!>T<!>: suspend () -> <!DEBUG_INFO_MISSING_UNRESOLVED!>Unit<!>, <!DEBUG_INFO_MISSING_UNRESOLVED!>T<!>: <!DEBUG_INFO_MISSING_UNRESOLVED!>Boolean<!> = x) {
|
||||
true -> null
|
||||
false -> null
|
||||
null -> null
|
||||
@@ -81,24 +81,24 @@ fun case_10(x: Boolean?) = when (val <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS_WARNI
|
||||
|
||||
// TESTCASE NUMBER: 11
|
||||
fun case_11() {
|
||||
val <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS_WARNING!><T><!> <!REDECLARATION!>x<!> by lazy { 1 }
|
||||
var <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS_WARNING!><T><!> <!NAME_SHADOWING, REDECLARATION!>x<!> by <!DELEGATE_SPECIAL_FUNCTION_MISSING!>lazy { 1 }<!>
|
||||
val <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS!><T><!> <!REDECLARATION!>x<!> by lazy { 1 }
|
||||
var <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS!><T><!> <!NAME_SHADOWING, REDECLARATION!>x<!> by <!DELEGATE_SPECIAL_FUNCTION_MISSING!>lazy { 1 }<!>
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 12
|
||||
fun case_12() {
|
||||
val <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS_WARNING!><T : <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!>><!> <!REDECLARATION!>x<!>: Int
|
||||
var <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS_WARNING!><T : <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!>><!> <!NAME_SHADOWING, REDECLARATION!>x<!>: Int
|
||||
val <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS!><T : <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!>><!> <!REDECLARATION!>x<!>: Int
|
||||
var <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS!><T : <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!>><!> <!NAME_SHADOWING, REDECLARATION!>x<!>: Int
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 13
|
||||
fun case_13() {
|
||||
val <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS_WARNING!><T : <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!>><!> <!REDECLARATION!>x<!>: Int where <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!>: <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!>
|
||||
var <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS_WARNING!><T : <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!>><!> <!NAME_SHADOWING, REDECLARATION!>x<!>: Int where <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!>: <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!>
|
||||
val <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS!><T : <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!>><!> <!REDECLARATION!>x<!>: Int where <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!>: <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!>
|
||||
var <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS!><T : <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!>><!> <!NAME_SHADOWING, REDECLARATION!>x<!>: Int where <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!>: <!DEBUG_INFO_MISSING_UNRESOLVED!>__UNRESOLVED__<!>
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 14
|
||||
fun case_14() {
|
||||
val <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS_WARNING!><T : <!DEBUG_INFO_MISSING_UNRESOLVED!>T<!>><!> x1 = 1
|
||||
var <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS_WARNING!><T : <!DEBUG_INFO_MISSING_UNRESOLVED!>T<!>><!> x2 = 1
|
||||
val <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS!><T : <!DEBUG_INFO_MISSING_UNRESOLVED!>T<!>><!> x1 = 1
|
||||
var <!LOCAL_VARIABLE_WITH_TYPE_PARAMETERS!><T : <!DEBUG_INFO_MISSING_UNRESOLVED!>T<!>><!> x2 = 1
|
||||
}
|
||||
|
||||
+17
-17
@@ -1,56 +1,56 @@
|
||||
fun Int?.optint() : Unit {}
|
||||
val Int?.optval : Unit get() = Unit
|
||||
|
||||
fun <T: Any, E> T.foo(<warning>x</warning> : E, y : A) : T {
|
||||
fun <T: Any, E> T.foo(<warning descr="[UNUSED_PARAMETER] Parameter 'x' is never used">x</warning> : E, y : A) : T {
|
||||
y.plus(1)
|
||||
y plus 1
|
||||
y + 1.0
|
||||
|
||||
this<warning>?.</warning>minus<T>(this)
|
||||
this<warning descr="[UNNECESSARY_SAFE_CALL] Unnecessary safe call on a non-null receiver of type T">?.</warning>minus<T>(this)
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
class A
|
||||
|
||||
infix operator fun A.plus(<warning>a</warning> : Any) {
|
||||
infix operator fun A.plus(<warning descr="[UNUSED_PARAMETER] Parameter 'a' is never used">a</warning> : Any) {
|
||||
|
||||
1.foo()
|
||||
true.<error>foo</error>(<error><error>)</error></error>
|
||||
true.<error descr="[NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER] Not enough information to infer type variable E">foo</error>(<error descr="[NO_VALUE_FOR_PARAMETER] No value passed for parameter 'x'"><error descr="[NO_VALUE_FOR_PARAMETER] No value passed for parameter 'y'">)</error></error>
|
||||
|
||||
<warning>1</warning>
|
||||
<warning descr="[UNUSED_EXPRESSION] The expression is unused">1</warning>
|
||||
}
|
||||
|
||||
infix operator fun A.plus(<warning>a</warning> : Int) {
|
||||
<warning>1</warning>
|
||||
infix operator fun A.plus(<warning descr="[UNUSED_PARAMETER] Parameter 'a' is never used">a</warning> : Int) {
|
||||
<warning descr="[UNUSED_EXPRESSION] The expression is unused">1</warning>
|
||||
}
|
||||
|
||||
fun <T> T.minus(<warning>t</warning> : T) : Int = 1
|
||||
fun <T> T.minus(<warning descr="[UNUSED_PARAMETER] Parameter 't' is never used">t</warning> : T) : Int = 1
|
||||
|
||||
fun test() {
|
||||
val <warning>y</warning> = 1.abs
|
||||
val <warning descr="[UNUSED_VARIABLE] Variable 'y' is never used">y</warning> = 1.abs
|
||||
}
|
||||
val Int.abs : Int
|
||||
get() = if (this > 0) this else -this;
|
||||
|
||||
<error>val <T> T.foo : T</error>
|
||||
<error descr="[EXTENSION_PROPERTY_MUST_HAVE_ACCESSORS_OR_BE_ABSTRACT] Extension property must have accessors or be abstract">val <T> T.foo : T</error>
|
||||
|
||||
fun Int.foo() = this
|
||||
|
||||
// FILE: b.kt
|
||||
//package null_safety
|
||||
|
||||
fun parse(<warning>cmd</warning>: String): Command? { return null }
|
||||
fun parse(<warning descr="[UNUSED_PARAMETER] Parameter 'cmd' is never used">cmd</warning>: String): Command? { return null }
|
||||
class Command() {
|
||||
// fun equals(other : Any?) : Boolean
|
||||
val foo : Int = 0
|
||||
}
|
||||
|
||||
<error>operator</error> fun Any.<warning>equals</warning>(<warning>other</warning> : Any?) : Boolean = true
|
||||
fun Any?.equals1(<warning>other</warning> : Any?) : Boolean = true
|
||||
fun Any.equals2(<warning>other</warning> : Any?) : Boolean = true
|
||||
<error descr="[INAPPLICABLE_OPERATOR_MODIFIER] 'operator' modifier is inapplicable on this function: must be a member function">operator</error> fun Any.<warning descr="[EXTENSION_SHADOWED_BY_MEMBER] Extension is shadowed by a member: public open operator fun equals(other: Any?): Boolean">equals</warning>(<warning descr="[UNUSED_PARAMETER] Parameter 'other' is never used">other</warning> : Any?) : Boolean = true
|
||||
fun Any?.equals1(<warning descr="[UNUSED_PARAMETER] Parameter 'other' is never used">other</warning> : Any?) : Boolean = true
|
||||
fun Any.equals2(<warning descr="[UNUSED_PARAMETER] Parameter 'other' is never used">other</warning> : Any?) : Boolean = true
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
fun main(<warning descr="[UNUSED_PARAMETER] Parameter 'args' is never used">args</warning>: Array<String>) {
|
||||
|
||||
System.out.print(1)
|
||||
|
||||
@@ -64,7 +64,7 @@ fun Int.foo() = this
|
||||
command?.equals1(null)
|
||||
|
||||
val c = Command()
|
||||
c<warning>?.</warning>equals2(null)
|
||||
c<warning descr="[UNNECESSARY_SAFE_CALL] Unnecessary safe call on a non-null receiver of type Command">?.</warning>equals2(null)
|
||||
|
||||
if (command == null) <warning>1</warning>
|
||||
if (command == null) <warning descr="[UNUSED_EXPRESSION] The expression is unused">1</warning>
|
||||
}
|
||||
|
||||
+2
-2
@@ -6,8 +6,8 @@ fun test(r: Runnable) {
|
||||
ForceSam.compare(r, r)
|
||||
ForceSam.compare({}, {})
|
||||
|
||||
ForceSam.compare(r, <error descr="[TYPE_MISMATCH] Type mismatch: inferred type is () -> Unit but Runnable was expected">{}</error>)
|
||||
ForceSam.compare(<error descr="[TYPE_MISMATCH] Type mismatch: inferred type is () -> Unit but Runnable was expected">{}</error>, r)
|
||||
ForceSam.compare(r, {})
|
||||
ForceSam.compare({}, r)
|
||||
}
|
||||
|
||||
// Check that new inference is enabled
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ package test2
|
||||
|
||||
<info descr="null">enum</info> class En { A, B, С }
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
fun main(<warning descr="[UNUSED_PARAMETER] Parameter 'args' is never used">args</warning>: Array<String>) {
|
||||
val en2: Any? = En.A
|
||||
if (en2 is En) {
|
||||
when (<info descr="Smart cast to test2.En">en2</info>) {
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
fun main(args: Array<String>) {
|
||||
fun main(<warning descr="[UNUSED_PARAMETER] Parameter 'args' is never used">args</warning>: Array<String>) {
|
||||
println("Hello World")
|
||||
}
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// FIR_COMPARISON
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
fun main(<warning descr="[UNUSED_PARAMETER] Parameter 'args' is never used">args</warning>: Array<String>) {
|
||||
String.class<EOLError descr="Name expected"></EOLError>
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -11,7 +11,7 @@ fun takeFirst(expr: StringBuilder): Char {
|
||||
|
||||
fun evaluateArg(expr: CharSequence, numbers: ArrayList<Int>): Int {
|
||||
if (expr.length == 0) throw Exception("Syntax error: Character expected");
|
||||
val c = takeFirst(<error>expr</error>)
|
||||
val c = takeFirst(<error descr="[TYPE_MISMATCH] Type mismatch: inferred type is CharSequence but kotlin.text.StringBuilder /* = java.lang.StringBuilder */ was expected">expr</error>)
|
||||
if (c >= '0' && c <= '9') {
|
||||
val n = c - '0'
|
||||
if (!numbers.contains(n)) throw Exception("You used incorrect number: " + n)
|
||||
@@ -32,13 +32,13 @@ fun evaluateAdd(expr: StringBuilder, numbers: ArrayList<Int>): Int {
|
||||
fun evaluate(expr: StringBuilder, numbers: ArrayList<Int>): Int {
|
||||
val lhs = evaluateAdd(expr, numbers)
|
||||
if (expr.length > 0) {
|
||||
val <warning>c</warning> = expr.get(0)
|
||||
val <warning descr="[UNUSED_VARIABLE] Variable 'c' is never used">c</warning> = expr.get(0)
|
||||
expr.deleteCharAt(0)
|
||||
}
|
||||
return lhs
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
fun main(<warning descr="[UNUSED_PARAMETER] Parameter 'args' is never used">args</warning>: Array<String>) {
|
||||
System.out.println("24 game")
|
||||
val numbers = ArrayList<Int>(4)
|
||||
val rnd = Random();
|
||||
|
||||
+4
-4
@@ -2,11 +2,11 @@
|
||||
|
||||
class Command() {}
|
||||
|
||||
fun parse(<warning>cmd</warning>: String): Command? { return null }
|
||||
fun parse(<warning descr="[UNUSED_PARAMETER] Parameter 'cmd' is never used">cmd</warning>: String): Command? { return null }
|
||||
|
||||
fun Any.<warning>equals</warning>(other : Any?) : Boolean = this === other
|
||||
fun Any.<warning descr="[EXTENSION_SHADOWED_BY_MEMBER] Extension is shadowed by a member: public open operator fun equals(other: Any?): Boolean">equals</warning>(other : Any?) : Boolean = this === other
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
fun main(<warning descr="[UNUSED_PARAMETER] Parameter 'args' is never used">args</warning>: Array<String>) {
|
||||
val command = parse("")
|
||||
if (command == null) <warning>1</warning> // error on this line, but must be OK
|
||||
if (command == null) <warning descr="[UNUSED_EXPRESSION] The expression is unused">1</warning> // error on this line, but must be OK
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// FIR_COMPARISON
|
||||
|
||||
fun Any.<warning>equals</warning>(<warning>other</warning> : Any?) : Boolean = true
|
||||
fun Any.<warning descr="[EXTENSION_SHADOWED_BY_MEMBER] Extension is shadowed by a member: public open operator fun equals(other: Any?): Boolean">equals</warning>(<warning descr="[UNUSED_PARAMETER] Parameter 'other' is never used">other</warning> : Any?) : Boolean = true
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
fun main(<warning descr="[UNUSED_PARAMETER] Parameter 'args' is never used">args</warning>: Array<String>) {
|
||||
|
||||
val command : Any = 1
|
||||
|
||||
command<warning>?.</warning>equals(null)
|
||||
command<warning descr="[UNNECESSARY_SAFE_CALL] Unnecessary safe call on a non-null receiver of type Any">?.</warning>equals(null)
|
||||
command.equals(null)
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// !DIAGNOSTICS_NUMBER: 2
|
||||
// !DIAGNOSTICS: INCOMPATIBLE_ENUM_COMPARISON
|
||||
// !DIAGNOSTICS: INCOMPATIBLE_ENUM_COMPARISON_ERROR
|
||||
// !MESSAGE_TYPE: TEXT
|
||||
|
||||
enum class E1 {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Surround with *arrayOf(...)" "true"
|
||||
// COMPILER_ARGUMENTS: -XXLanguage:+ProhibitAssigningSingleElementsToVarargsInNamedForm
|
||||
// COMPILER_ARGUMENTS: -XXLanguage:+ProhibitAssigningSingleElementsToVarargsInNamedForm -XXLanguage:-AllowAssigningArrayElementsToVarargsInNamedFormForFunctions
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun anyFoo(vararg a: Any) {}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Surround with *arrayOf(...)" "true"
|
||||
// COMPILER_ARGUMENTS: -XXLanguage:+ProhibitAssigningSingleElementsToVarargsInNamedForm
|
||||
// COMPILER_ARGUMENTS: -XXLanguage:+ProhibitAssigningSingleElementsToVarargsInNamedForm -XXLanguage:-AllowAssigningArrayElementsToVarargsInNamedFormForFunctions
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun anyFoo(vararg a: Any) {}
|
||||
|
||||
@@ -206,7 +206,7 @@ abstract class Tag(val name: String) : Element() {
|
||||
val children = ArrayList<Element>()
|
||||
val attributes = HashMap<String, String>()
|
||||
|
||||
inline protected fun <T : Element> initTag(tag: T, init: T.() -> Unit): T {
|
||||
inline fun <T : Element> initTag(tag: T, init: T.() -> Unit): T {
|
||||
tag.init()
|
||||
children.add(tag)
|
||||
return tag
|
||||
|
||||
+1
-1
@@ -210,7 +210,7 @@ abstract class Tag(val name: String) : Element() {
|
||||
val children = ArrayList<Element>()
|
||||
val attributes = HashMap<String, String>()
|
||||
|
||||
inline protected fun <T : Element> initTag(tag: T, init: T.() -> Unit): T {
|
||||
inline fun <T : Element> initTag(tag: T, init: T.() -> Unit): T {
|
||||
tag.init()
|
||||
children.add(tag)
|
||||
return tag
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ fun box(): String {
|
||||
check(js("String"), "String", String::class)
|
||||
check(js("Boolean"), "Boolean", Boolean::class)
|
||||
check(js("Error"), "Throwable", Throwable::class)
|
||||
check(js("Array"), "Array", Array<Any>::class)
|
||||
check(js("Array"), "Array", Array::class)
|
||||
check(js("Function"), "Function0", Function0::class)
|
||||
check(js("Function"), "Function1", Function1::class)
|
||||
|
||||
|
||||
+2
-2
@@ -6,14 +6,14 @@ interface KotlinCommonOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonToo
|
||||
|
||||
/**
|
||||
* Allow using declarations only from the specified version of bundled libraries
|
||||
* Possible values: "1.0", "1.1", "1.2", "1.3", "1.4 (EXPERIMENTAL)"
|
||||
* Possible values: "1.0", "1.1", "1.2", "1.3", "1.4"
|
||||
* Default value: null
|
||||
*/
|
||||
var apiVersion: kotlin.String?
|
||||
|
||||
/**
|
||||
* Provide source compatibility with the specified version of Kotlin
|
||||
* Possible values: "1.0", "1.1", "1.2", "1.3", "1.4 (EXPERIMENTAL)"
|
||||
* Possible values: "1.0", "1.1", "1.2", "1.3", "1.4"
|
||||
* Default value: null
|
||||
*/
|
||||
var languageVersion: kotlin.String?
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ package {
|
||||
// requires language version 1.3.0 (level=ERROR, message="property must not be used!")
|
||||
// field: property:Ljava/lang/String;
|
||||
// getter: getProperty()Ljava/lang/String;
|
||||
// synthetic method for annotations: property$annotations()V
|
||||
// synthetic method for annotations: getProperty$annotations()V
|
||||
public final val property: kotlin/String /* = ... */
|
||||
public final get
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ public final class TestAnno2 {
|
||||
|
||||
@Anno3(value = "property")
|
||||
@java.lang.Deprecated()
|
||||
public static void b$annotations() {
|
||||
public static void getB$annotations() {
|
||||
}
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
|
||||
@@ -31,7 +31,7 @@ public final class AnnotationsTest {
|
||||
|
||||
@Anno(value = "top-level-val")
|
||||
@java.lang.Deprecated()
|
||||
public static void topLevelVal$annotations(int p0) {
|
||||
public static void getTopLevelVal$annotations(int p0) {
|
||||
}
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
@@ -84,7 +84,7 @@ public abstract class Test {
|
||||
|
||||
@Anno(value = "abstract-val")
|
||||
@java.lang.Deprecated()
|
||||
public static void abstractVal$annotations() {
|
||||
public static void getAbstractVal$annotations() {
|
||||
}
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
@@ -92,7 +92,7 @@ public abstract class Test {
|
||||
|
||||
@Anno(value = "v-property")
|
||||
@java.lang.Deprecated()
|
||||
public static void v$annotations() {
|
||||
public static void getV$annotations() {
|
||||
}
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
|
||||
@@ -19,7 +19,7 @@ public final class Bar {
|
||||
@Anno()
|
||||
@PropertyAnno()
|
||||
@java.lang.Deprecated()
|
||||
public static void a$annotations() {
|
||||
public static void getA$annotations() {
|
||||
}
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
@@ -45,7 +45,7 @@ public final class Baz {
|
||||
|
||||
@Anno()
|
||||
@java.lang.Deprecated()
|
||||
public static void a$annotations() {
|
||||
public static void getA$annotations() {
|
||||
}
|
||||
|
||||
public Baz() {
|
||||
@@ -78,7 +78,7 @@ public final class Foo {
|
||||
|
||||
@PropertyAnno()
|
||||
@java.lang.Deprecated()
|
||||
public static void a$annotations() {
|
||||
public static void getA$annotations() {
|
||||
}
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
|
||||
@@ -88,7 +88,7 @@ public final class Test {
|
||||
*/
|
||||
@Anno()
|
||||
@java.lang.Deprecated()
|
||||
public static void prop2$annotations() {
|
||||
public static void getProp2$annotations() {
|
||||
}
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
|
||||
@@ -26,7 +26,7 @@ public final class Foo {
|
||||
}
|
||||
|
||||
@java.lang.Deprecated()
|
||||
public static void prop$annotations() {
|
||||
public static void getProp$annotations() {
|
||||
}
|
||||
|
||||
@java.lang.Deprecated()
|
||||
|
||||
@@ -21,7 +21,7 @@ public final class JvmStaticTest {
|
||||
public static final class Companion {
|
||||
|
||||
@java.lang.Deprecated()
|
||||
public static void one$annotations() {
|
||||
public static void getOne$annotations() {
|
||||
}
|
||||
|
||||
public final int getOne() {
|
||||
|
||||
@@ -19,7 +19,7 @@ public final class Test {
|
||||
public static final class A {
|
||||
|
||||
@java.lang.Deprecated()
|
||||
public static void test$annotations() {
|
||||
public static void getTest$annotations() {
|
||||
}
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
|
||||
@@ -137,7 +137,7 @@ public final class MyActivity {
|
||||
|
||||
@Bind(id = lib.R.id.textView)
|
||||
@java.lang.Deprecated()
|
||||
public static void a$annotations() {
|
||||
public static void getA$annotations() {
|
||||
}
|
||||
|
||||
public final int getA() {
|
||||
@@ -146,7 +146,7 @@ public final class MyActivity {
|
||||
|
||||
@Bind(id = lib.R.id.textView)
|
||||
@java.lang.Deprecated()
|
||||
public static void b$annotations() {
|
||||
public static void getB$annotations() {
|
||||
}
|
||||
|
||||
public final int getB() {
|
||||
@@ -155,7 +155,7 @@ public final class MyActivity {
|
||||
|
||||
@Bind(id = app.R.layout.mainActivity)
|
||||
@java.lang.Deprecated()
|
||||
public static void c$annotations() {
|
||||
public static void getC$annotations() {
|
||||
}
|
||||
|
||||
public final int getC() {
|
||||
@@ -164,7 +164,7 @@ public final class MyActivity {
|
||||
|
||||
@Bind(id = app.R.layout.mainActivity)
|
||||
@java.lang.Deprecated()
|
||||
public static void d$annotations() {
|
||||
public static void getD$annotations() {
|
||||
}
|
||||
|
||||
public final int getD() {
|
||||
@@ -174,7 +174,7 @@ public final class MyActivity {
|
||||
@Anno(a1 = app.B.a1, a2 = app.B.a2, a3 = app.B.a3, a4 = app.B.a4, a5 = app.B.a5, a6 = app.B.a6, a7 = app.B.a7, a8 = app.B.a8, a9 = "A")
|
||||
@Bind(id = app.R2.layout.mainActivity)
|
||||
@java.lang.Deprecated()
|
||||
public static void e$annotations() {
|
||||
public static void getE$annotations() {
|
||||
}
|
||||
|
||||
public final int getE() {
|
||||
@@ -183,7 +183,7 @@ public final class MyActivity {
|
||||
|
||||
@Bind(id = app.B.id.textView)
|
||||
@java.lang.Deprecated()
|
||||
public static void f$annotations() {
|
||||
public static void getF$annotations() {
|
||||
}
|
||||
|
||||
public final int getF() {
|
||||
|
||||
@@ -30,7 +30,7 @@ public final class Test {
|
||||
@Anno2()
|
||||
@Anno()
|
||||
@java.lang.Deprecated()
|
||||
public static void prop$annotations() {
|
||||
public static void getProp$annotations() {
|
||||
}
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
|
||||
@@ -190,7 +190,7 @@ public final class Test {
|
||||
@lib.Anno(value = "2", construct = {"A", "B"})
|
||||
@lib.Anno(value = "1")
|
||||
@java.lang.Deprecated()
|
||||
public static void value$annotations() {
|
||||
public static void getValue$annotations() {
|
||||
}
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
|
||||
@@ -54,7 +54,7 @@ public final class TopLevelKt {
|
||||
|
||||
@Anno(value = "extpr")
|
||||
@java.lang.Deprecated()
|
||||
public static void extensionProperty$annotations(java.lang.Object p0) {
|
||||
public static void getExtensionProperty$annotations(java.lang.Object p0) {
|
||||
}
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
|
||||
Reference in New Issue
Block a user