Switch kotlin version to 1.7
* Change 1.6 to 1.7 constants * Fix SAFE_CALL_WILL_CHANGE_NULLABILITY for testData * Change EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_WARNING to EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR * Change NON_EXHAUSTIVE_WHEN_STATEMENT to NO_ELSE_IN_WHEN * Fix testData for SafeCallsAreAlwaysNullable * Change T -> T & Any in test dumps * Change INVALID_CHARACTERS_NATIVE_WARNING -> INVALID_CHARACTERS_NATIVE_ERROR * TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_WARNING -> TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_ERROR
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ interface A
|
||||
fun <T> test(t: T) {
|
||||
@Denotable("T") t
|
||||
if (t != null) {
|
||||
(@Nondenotable("T!!") t).equals("")
|
||||
(@Denotable("T!!") t).equals("")
|
||||
}
|
||||
val outs = take(getOutProjection())
|
||||
@Denotable("A") outs
|
||||
|
||||
@@ -412,8 +412,8 @@ class GenerationState private constructor(
|
||||
this[KOTLIN_1_3] = oldMetadataVersion
|
||||
this[KOTLIN_1_4] = JvmMetadataVersion(1, 4, 3)
|
||||
this[KOTLIN_1_5] = JvmMetadataVersion(1, 5, 1)
|
||||
this[KOTLIN_1_6] = JvmMetadataVersion.INSTANCE
|
||||
this[KOTLIN_1_7] = JvmMetadataVersion(1, 7, 0)
|
||||
this[KOTLIN_1_6] = JvmMetadataVersion(1, 6, 0)
|
||||
this[KOTLIN_1_7] = JvmMetadataVersion.INSTANCE
|
||||
this[KOTLIN_1_8] = JvmMetadataVersion(1, 8, 0)
|
||||
this[KOTLIN_1_9] = JvmMetadataVersion(1, 9, 0)
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ fun test(ordinal: Int) {
|
||||
buildString {
|
||||
insert(KDocTemplate()) {
|
||||
definition {
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>ordinal<!UNNECESSARY_SAFE_CALL!>?.<!>let {}<!>
|
||||
ordinal<!UNNECESSARY_SAFE_CALL!>?.<!>let {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -27,7 +27,7 @@ fun test_2(cond: Boolean?) {
|
||||
}
|
||||
|
||||
fun test_3(cond: Boolean) {
|
||||
<!NON_EXHAUSTIVE_WHEN_STATEMENT!>when<!> (cond) {
|
||||
<!NO_ELSE_IN_WHEN!>when<!> (cond) {
|
||||
true -> 1
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ fun test_2(enum: SomeEnum?) {
|
||||
}
|
||||
|
||||
fun test_3(enum: SomeEnum) {
|
||||
<!NON_EXHAUSTIVE_WHEN_STATEMENT!>when<!> (enum) {
|
||||
<!NO_ELSE_IN_WHEN!>when<!> (enum) {
|
||||
SomeEnum.A -> 1
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -44,7 +44,7 @@ fun test_2(base: Base?) {
|
||||
}
|
||||
|
||||
fun test_3(base: Base) {
|
||||
<!NON_EXHAUSTIVE_WHEN_STATEMENT!>when<!> (base) {
|
||||
<!NO_ELSE_IN_WHEN!>when<!> (base) {
|
||||
is A -> 1
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -17,4 +17,4 @@ class A {
|
||||
open class Test
|
||||
inline class ExtendTest(val x: Int): <!SUPERTYPE_NOT_INITIALIZED, VALUE_CLASS_CANNOT_EXTEND_CLASSES!>Test<!>
|
||||
|
||||
inline class ImplementByDelegation(val x: Int) : <!VALUE_CLASS_CANNOT_IMPLEMENT_INTERFACE_BY_DELEGATION!>Comparable<Int><!> by x
|
||||
inline class ImplementByDelegation(val x: Int) : Comparable<Int> by x
|
||||
|
||||
+2
-2
@@ -69,8 +69,8 @@ fun test_6(d1: D) {
|
||||
}
|
||||
|
||||
fun test_7(d1: D, d2: D) {
|
||||
val a = <!SAFE_CALL_WILL_CHANGE_NULLABILITY!>d1<!UNNECESSARY_SAFE_CALL!>?.<!>any<!>
|
||||
val b = <!SAFE_CALL_WILL_CHANGE_NULLABILITY!>d2<!UNNECESSARY_SAFE_CALL!>?.<!>any<!>
|
||||
val a = d1<!UNNECESSARY_SAFE_CALL!>?.<!>any
|
||||
val b = d2<!UNNECESSARY_SAFE_CALL!>?.<!>any
|
||||
a as A
|
||||
a.foo() // should be OK
|
||||
b as B
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ typealias TA = A<CharSequence>
|
||||
fun bar(): TA = TODO()
|
||||
|
||||
fun foo() {
|
||||
<!NON_EXHAUSTIVE_WHEN_STATEMENT!>when<!> (val a = bar()) {
|
||||
<!NO_ELSE_IN_WHEN!>when<!> (val a = bar()) {
|
||||
is A.B -> a.x.length
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@SinceKotlin("1.4")
|
||||
@SinceKotlin("1.5")
|
||||
fun old() {}
|
||||
|
||||
@SinceKotlin("1.5")
|
||||
@SinceKotlin("1.6")
|
||||
fun new() {}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
warning: API version 1.4 is deprecated and its support will be removed in a future version of Kotlin
|
||||
compiler/testData/cli/jvm/apiVersionAndSinceNewerKotlin.kt:4:1: warning: the version is greater than the specified API version 1.4
|
||||
compiler/testData/cli/jvm/apiVersionAndSinceNewerKotlin.kt:1:1: warning: the version is greater than the specified API version 1.4
|
||||
@SinceKotlin("1.5")
|
||||
^
|
||||
compiler/testData/cli/jvm/apiVersionAndSinceNewerKotlin.kt:4:1: warning: the version is greater than the specified API version 1.4
|
||||
@SinceKotlin("1.6")
|
||||
^
|
||||
OK
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
error: unknown API version: 239.42
|
||||
Supported API versions: 1.3 (DEPRECATED), 1.4 (DEPRECATED), 1.5, 1.6, 1.7 (EXPERIMENTAL), 1.8 (EXPERIMENTAL), 1.9 (EXPERIMENTAL)
|
||||
Supported API versions: 1.3 (DEPRECATED), 1.4 (DEPRECATED), 1.5, 1.6, 1.7, 1.8 (EXPERIMENTAL), 1.9 (EXPERIMENTAL)
|
||||
COMPILATION_ERROR
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
error: unknown language version: 239.42
|
||||
Supported language versions: 1.3 (DEPRECATED), 1.4 (DEPRECATED), 1.5, 1.6, 1.7 (EXPERIMENTAL), 1.8 (EXPERIMENTAL), 1.9 (EXPERIMENTAL)
|
||||
Supported language versions: 1.3 (DEPRECATED), 1.4 (DEPRECATED), 1.5, 1.6, 1.7, 1.8 (EXPERIMENTAL), 1.9 (EXPERIMENTAL)
|
||||
COMPILATION_ERROR
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
compiler/testData/cli/jvm/readingConfigFromEnvironment/appendingArgs.kt:4:9: warning: [UNUSED_VARIABLE] Variable 'x' is never used
|
||||
val x = 1?.dec()
|
||||
^
|
||||
compiler/testData/cli/jvm/readingConfigFromEnvironment/appendingArgs.kt:4:13: warning: [SAFE_CALL_WILL_CHANGE_NULLABILITY] Safe call on a non-null receiver will have nullable type in future releases
|
||||
val x = 1?.dec()
|
||||
^
|
||||
compiler/testData/cli/jvm/readingConfigFromEnvironment/appendingArgs.kt:4:14: warning: [UNNECESSARY_SAFE_CALL] Unnecessary safe call on a non-null receiver of type Int
|
||||
val x = 1?.dec()
|
||||
^
|
||||
|
||||
@@ -41,6 +41,7 @@ fun getSequence(a: Foo) =
|
||||
Foo.E-> {
|
||||
yield("E")
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
yield("end")
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
class MyObject private constructor(val delegate: Interface) : Interface by delegate {
|
||||
class MyObject private constructor(private val delegate: Interface) : Interface by delegate {
|
||||
constructor() : this(Delegate())
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ class Delegate : Interface {
|
||||
}
|
||||
}
|
||||
|
||||
private interface Interface {
|
||||
interface Interface {
|
||||
fun greet(): String
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// CHECK_BYTECODE_LISTING
|
||||
// IGNORE_BACKEND: JS, JS_IR, WASM, NATIVE
|
||||
// TODO: Fir2Ir generates overrides as finals.
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
@JvmInline
|
||||
value class Inlined(val value: Int)
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
@kotlin.Metadata
|
||||
public interface A {
|
||||
// source: 'overrideReturnNothing.kt'
|
||||
public abstract @org.jetbrains.annotations.Nullable method foo-wSRmS7I(): Inlined
|
||||
public abstract method foo2-yXoPhBc(): int
|
||||
public abstract @org.jetbrains.annotations.Nullable method getProperty-wSRmS7I(): Inlined
|
||||
public abstract method getProperty2-yXoPhBc(): int
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class B {
|
||||
// source: 'overrideReturnNothing.kt'
|
||||
private final @org.jetbrains.annotations.Nullable field property: java.lang.Void
|
||||
public method <init>(): void
|
||||
public @org.jetbrains.annotations.Nullable method foo(): java.lang.Void
|
||||
public synthetic bridge method foo-wSRmS7I(): Inlined
|
||||
public @org.jetbrains.annotations.NotNull method foo2(): java.lang.Void
|
||||
public synthetic bridge method foo2-yXoPhBc(): int
|
||||
public @org.jetbrains.annotations.Nullable method getProperty(): java.lang.Void
|
||||
public synthetic bridge method getProperty-wSRmS7I(): Inlined
|
||||
public @org.jetbrains.annotations.NotNull method getProperty2(): java.lang.Void
|
||||
public synthetic bridge method getProperty2-yXoPhBc(): int
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline
|
||||
@kotlin.Metadata
|
||||
public final class Inlined {
|
||||
// source: 'overrideReturnNothing.kt'
|
||||
private final field value: int
|
||||
private synthetic method <init>(p0: int): void
|
||||
public synthetic final static method box-impl(p0: int): Inlined
|
||||
public static method constructor-impl(p0: int): int
|
||||
public method equals(p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: int, p1: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: int, p1: int): boolean
|
||||
public final method getValue(): int
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: int): int
|
||||
public method toString(): java.lang.String
|
||||
public static method toString-impl(p0: int): java.lang.String
|
||||
public synthetic final method unbox-impl(): int
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class OverrideReturnNothingKt {
|
||||
// source: 'overrideReturnNothing.kt'
|
||||
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
|
||||
}
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// !LANGUAGE: +StrictJavaNullabilityAssertions -ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// FIR status: expected: <OK> but was: <Fail: SHOULD NOT throw>, issue related to T & Any
|
||||
// See KT-8135
|
||||
// We could generate runtime assertion on call site for 'generic<NOT_NULL_TYPE>()' below.
|
||||
|
||||
|
||||
+1
-1
@@ -2,6 +2,6 @@ enum class A { X1, X2 }
|
||||
|
||||
fun box(): String {
|
||||
when {}
|
||||
when (A.X1) {}
|
||||
when (A.X1) { else -> {} }
|
||||
return "OK"
|
||||
}
|
||||
|
||||
@@ -15,10 +15,8 @@ fun bar1(x : BigEnum) : String {
|
||||
when (x) {
|
||||
BigEnum.ITEM1, BigEnum.ITEM2, BigEnum.ITEM3 -> return "123"
|
||||
BigEnum.ITEM4, BigEnum.ITEM5, BigEnum.ITEM6 -> return "456"
|
||||
else -> return "-1";
|
||||
}
|
||||
|
||||
return "-1";
|
||||
|
||||
}
|
||||
|
||||
fun bar2(x : BigEnum) : String {
|
||||
|
||||
+1
-2
@@ -20,9 +20,8 @@ class A {
|
||||
Season.WINTER, Season.SPRING -> return "winter_spring"
|
||||
Season.SPRING -> return "spring"
|
||||
Season.SUMMER -> return "summer"
|
||||
else -> return "autumn";
|
||||
}
|
||||
|
||||
return "autumn";
|
||||
}
|
||||
|
||||
public fun bar2(y : Season) : String {
|
||||
|
||||
@@ -21,18 +21,16 @@ fun foo1(x : Season?) : String {
|
||||
when(x) {
|
||||
Season.AUTUMN, Season.SPRING -> return "autumn_or_spring";
|
||||
Season.SUMMER, null -> return "summer_or_null"
|
||||
else -> return "other"
|
||||
}
|
||||
|
||||
return "other"
|
||||
}
|
||||
|
||||
fun foo2(x : Season?) : String {
|
||||
when(x) {
|
||||
Season.AUTUMN, Season.SPRING -> return "autumn_or_spring";
|
||||
Season.SUMMER -> return "summer"
|
||||
else -> return "other"
|
||||
}
|
||||
|
||||
return "other"
|
||||
}
|
||||
|
||||
fun box() : String {
|
||||
|
||||
@@ -20,8 +20,8 @@ fun bar1(x : Season) : String {
|
||||
Season.WINTER, Season.SPRING -> return "winter_spring"
|
||||
Season.SPRING -> return "spring"
|
||||
Season.SUMMER -> return "summer"
|
||||
else -> return "autumn"
|
||||
}
|
||||
return "autumn"
|
||||
}
|
||||
|
||||
fun bar2(x : Season) : String {
|
||||
@@ -30,9 +30,8 @@ fun bar2(x : Season) : String {
|
||||
Season.SPRING -> return "spring"
|
||||
Season.SUMMER -> return "summer"
|
||||
Season.AUTUMN -> return "autumn"
|
||||
else -> return "fail unknown"
|
||||
}
|
||||
|
||||
return "fail unknown"
|
||||
}
|
||||
|
||||
fun box() : String {
|
||||
|
||||
+2
-4
@@ -14,18 +14,16 @@ fun foo1(x : Season?) : String {
|
||||
when(val xx = x) {
|
||||
Season.AUTUMN, Season.SPRING -> return "autumn_or_spring $xx";
|
||||
Season.SUMMER, null -> return "summer_or_null $xx"
|
||||
else -> return "other"
|
||||
}
|
||||
|
||||
return "other"
|
||||
}
|
||||
|
||||
fun foo2(x : Season?) : String {
|
||||
when(val xx = x) {
|
||||
Season.AUTUMN, Season.SPRING -> return "autumn_or_spring $xx";
|
||||
Season.SUMMER -> return "summer"
|
||||
else -> return "other"
|
||||
}
|
||||
|
||||
return "other"
|
||||
}
|
||||
|
||||
fun box() : String {
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@ fun test(s: String) = s?.length
|
||||
// 0 IFNULL
|
||||
// 0 IFNONNULL
|
||||
// 0 intValue
|
||||
// 0 valueOf
|
||||
// 1 valueOf
|
||||
|
||||
@@ -9,10 +9,8 @@ fun bar1(x : BigEnum) : String {
|
||||
when (x) {
|
||||
BigEnum.ITEM1, BigEnum.ITEM2, BigEnum.ITEM3 -> return "123"
|
||||
BigEnum.ITEM4, BigEnum.ITEM5, BigEnum.ITEM6 -> return "456"
|
||||
else -> return "-1"
|
||||
}
|
||||
|
||||
return "-1";
|
||||
|
||||
}
|
||||
|
||||
fun bar2(x : BigEnum) : String {
|
||||
|
||||
+1
-2
@@ -13,9 +13,8 @@ class A {
|
||||
Season.WINTER, Season.SPRING -> return "winter_spring"
|
||||
Season.SPRING -> return "spring"
|
||||
Season.SUMMER -> return "summer"
|
||||
else -> return "autumn"
|
||||
}
|
||||
|
||||
return "autumn";
|
||||
}
|
||||
|
||||
public fun bar2(y : Season) : String {
|
||||
|
||||
@@ -9,18 +9,16 @@ fun foo1(x : Season?) : String {
|
||||
when(x) {
|
||||
Season.AUTUMN, Season.SPRING -> return "autumn_or_spring";
|
||||
Season.SUMMER, null -> return "summer_or_null"
|
||||
else -> return "other"
|
||||
}
|
||||
|
||||
return "other"
|
||||
}
|
||||
|
||||
fun foo2(x : Season?) : String {
|
||||
when(x) {
|
||||
Season.AUTUMN, Season.SPRING -> return "autumn_or_spring";
|
||||
Season.SUMMER -> return "summer"
|
||||
else -> return "other"
|
||||
}
|
||||
|
||||
return "other"
|
||||
}
|
||||
|
||||
// 2 TABLESWITCH
|
||||
|
||||
@@ -12,8 +12,8 @@ fun bar1(x : Season) : String {
|
||||
Season.WINTER, Season.SPRING -> return "winter_spring"
|
||||
Season.SPRING -> return "spring"
|
||||
Season.SUMMER -> return "summer"
|
||||
else -> return "autumn"
|
||||
}
|
||||
return "autumn"
|
||||
}
|
||||
|
||||
fun bar2(x : Season) : String {
|
||||
@@ -22,9 +22,8 @@ fun bar2(x : Season) : String {
|
||||
Season.SPRING -> return "spring"
|
||||
Season.SUMMER -> return "summer"
|
||||
Season.AUTUMN -> return "autumn"
|
||||
else -> return "fail unknown"
|
||||
}
|
||||
|
||||
return "fail unknown"
|
||||
}
|
||||
|
||||
// 2 TABLESWITCH
|
||||
|
||||
+12
-12
@@ -1,37 +1,37 @@
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:13: error: 'A' is only available since Kotlin 42.33 and cannot be used in Kotlin 1.6. This declaration is only supported since Kotlin 42.33
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:13: error: 'A' is only available since Kotlin 42.33 and cannot be used in Kotlin 1.7. This declaration is only supported since Kotlin 42.33
|
||||
fun test(a: A): TA {
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:13: error: 'A' is only available since Kotlin 40.34 and cannot be used in Kotlin 1.6
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:13: error: 'A' is only available since Kotlin 40.34 and cannot be used in Kotlin 1.7
|
||||
fun test(a: A): TA {
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:13: error: 'A' is only available since Kotlin 45.35 and cannot be used in Kotlin 1.6
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:13: error: 'A' is only available since Kotlin 45.35 and cannot be used in Kotlin 1.7
|
||||
fun test(a: A): TA {
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:17: error: 'typealias TA = String' is only available since Kotlin 42.33 and cannot be used in Kotlin 1.6. This declaration is only supported since Kotlin 42.33
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:17: error: 'typealias TA = String' is only available since Kotlin 42.33 and cannot be used in Kotlin 1.7. This declaration is only supported since Kotlin 42.33
|
||||
fun test(a: A): TA {
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:17: error: 'typealias TA = String' is only available since Kotlin 40.34 and cannot be used in Kotlin 1.6
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:17: error: 'typealias TA = String' is only available since Kotlin 40.34 and cannot be used in Kotlin 1.7
|
||||
fun test(a: A): TA {
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:17: error: 'typealias TA = String' is only available since Kotlin 45.35 and cannot be used in Kotlin 1.6
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:17: error: 'typealias TA = String' is only available since Kotlin 45.35 and cannot be used in Kotlin 1.7
|
||||
fun test(a: A): TA {
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:4:5: error: 'f(): Unit' is only available since Kotlin 42.33 and cannot be used in Kotlin 1.6. This declaration is only supported since Kotlin 42.33
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:4:5: error: 'f(): Unit' is only available since Kotlin 42.33 and cannot be used in Kotlin 1.7. This declaration is only supported since Kotlin 42.33
|
||||
f()
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:4:5: error: 'f(): Unit' is only available since Kotlin 40.34 and cannot be used in Kotlin 1.6
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:4:5: error: 'f(): Unit' is only available since Kotlin 40.34 and cannot be used in Kotlin 1.7
|
||||
f()
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:4:5: error: 'f(): Unit' is only available since Kotlin 45.35 and cannot be used in Kotlin 1.6
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:4:5: error: 'f(): Unit' is only available since Kotlin 45.35 and cannot be used in Kotlin 1.7
|
||||
f()
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:5:12: error: 'p: String' is only available since Kotlin 42.33 and cannot be used in Kotlin 1.6. This declaration is only supported since Kotlin 42.33
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:5:12: error: 'p: String' is only available since Kotlin 42.33 and cannot be used in Kotlin 1.7. This declaration is only supported since Kotlin 42.33
|
||||
return p
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:5:12: error: 'p: String' is only available since Kotlin 40.34 and cannot be used in Kotlin 1.6
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:5:12: error: 'p: String' is only available since Kotlin 40.34 and cannot be used in Kotlin 1.7
|
||||
return p
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:5:12: error: 'p: String' is only available since Kotlin 45.35 and cannot be used in Kotlin 1.6
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:5:12: error: 'p: String' is only available since Kotlin 45.35 and cannot be used in Kotlin 1.7
|
||||
return p
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
Vendored
+2
-2
@@ -1,7 +1,7 @@
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClasses/source.kt:3:19: error: 'Nested' is only available since Kotlin 1.44 and cannot be used in Kotlin 1.6
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClasses/source.kt:3:19: error: 'Nested' is only available since Kotlin 1.44 and cannot be used in Kotlin 1.7
|
||||
fun test(a: Outer.Nested) {
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClasses/source.kt:4:7: error: 'f(): Unit' is only available since Kotlin 1.88 and cannot be used in Kotlin 1.6
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClasses/source.kt:4:7: error: 'f(): Unit' is only available since Kotlin 1.88 and cannot be used in Kotlin 1.7
|
||||
a.f()
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesAgainst14Js/source.kt:3:19: error: 'Nested' is only available since Kotlin 1.44 and cannot be used in Kotlin 1.6
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesAgainst14Js/source.kt:3:19: error: 'Nested' is only available since Kotlin 1.44 and cannot be used in Kotlin 1.7
|
||||
fun test(a: Outer.Nested) {
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesAgainst14Js/source.kt:4:7: error: 'f(): Unit' is only available since Kotlin 1.88 and cannot be used in Kotlin 1.6
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesAgainst14Js/source.kt:4:7: error: 'f(): Unit' is only available since Kotlin 1.88 and cannot be used in Kotlin 1.7
|
||||
a.f()
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
Vendored
+2
-2
@@ -1,7 +1,7 @@
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesJs/source.kt:3:19: error: 'Nested' is only available since Kotlin 1.44 and cannot be used in Kotlin 1.6
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesJs/source.kt:3:19: error: 'Nested' is only available since Kotlin 1.44 and cannot be used in Kotlin 1.7
|
||||
fun test(a: Outer.Nested) {
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesJs/source.kt:4:7: error: 'f(): Unit' is only available since Kotlin 1.88 and cannot be used in Kotlin 1.6
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesJs/source.kt:4:7: error: 'f(): Unit' is only available since Kotlin 1.88 and cannot be used in Kotlin 1.7
|
||||
a.f()
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
error: incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors
|
||||
$TMP_DIR$/library.jar!/META-INF/main.kotlin_module: error: module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.0, expected version is $ABI_VERSION$.
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:3:13: error: class 'a.C' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.0, expected version is $ABI_VERSION$.
|
||||
$TMP_DIR$/library.jar!/META-INF/main.kotlin_module: error: module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is $ABI_VERSION$.
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:3:13: error: class 'a.C' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is $ABI_VERSION$.
|
||||
The class is loaded from $TMP_DIR$/library.jar!/a/C.class
|
||||
fun test(c: C) {
|
||||
^
|
||||
@@ -10,15 +10,15 @@ compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemant
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:5:5: error: unresolved reference: v
|
||||
v
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:6:5: error: class 'a.C' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.0, expected version is $ABI_VERSION$.
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:6:5: error: class 'a.C' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is $ABI_VERSION$.
|
||||
The class is loaded from $TMP_DIR$/library.jar!/a/C.class
|
||||
c.let { C() }
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:6:7: error: class 'a.C' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.0, expected version is $ABI_VERSION$.
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:6:7: error: class 'a.C' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is $ABI_VERSION$.
|
||||
The class is loaded from $TMP_DIR$/library.jar!/a/C.class
|
||||
c.let { C() }
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:6:13: error: class 'a.C' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.0, expected version is $ABI_VERSION$.
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:6:13: error: class 'a.C' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is $ABI_VERSION$.
|
||||
The class is loaded from $TMP_DIR$/library.jar!/a/C.class
|
||||
c.let { C() }
|
||||
^
|
||||
|
||||
+1
@@ -12,3 +12,4 @@ public open class A</*0*/ T : kotlin.Any!> {
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@ package
|
||||
|
||||
public fun main(/*0*/ aNotNullNotNullNotNull: A<kotlin.Any, kotlin.Any, kotlin.Any>, /*1*/ aNotNullNotNullNull: A<kotlin.Any, kotlin.Any, kotlin.Any?>, /*2*/ aNotNullNullNotNull: A<kotlin.Any, kotlin.Any?, kotlin.Any>, /*3*/ aNotNullNullNull: A<kotlin.Any, kotlin.Any?, kotlin.Any?>, /*4*/ b: WildcardsWithDefault): kotlin.Unit
|
||||
|
||||
public open class A</*0*/ T : kotlin.Any!, /*1*/ E : @org.jspecify.nullness.Nullable kotlin.Any!, /*2*/ F : @org.jspecify.nullness.NullnessUnspecified kotlin.Any!> {
|
||||
public constructor A</*0*/ T : kotlin.Any!, /*1*/ E : @org.jspecify.nullness.Nullable kotlin.Any!, /*2*/ F : @org.jspecify.nullness.NullnessUnspecified kotlin.Any!>()
|
||||
public open class A</*0*/ T : kotlin.Any!, /*1*/ E, /*2*/ F : @org.jspecify.nullness.NullnessUnspecified kotlin.Any!> {
|
||||
public constructor A</*0*/ T : kotlin.Any!, /*1*/ E, /*2*/ F : @org.jspecify.nullness.NullnessUnspecified kotlin.Any!>()
|
||||
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
|
||||
|
||||
+2
-2
@@ -58,7 +58,7 @@ public class A {
|
||||
// FILE: main.kt
|
||||
fun main(a: A) {
|
||||
a.foo("").length
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>)<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
a.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>)<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
|
||||
a.bar("")<!UNSAFE_CALL!>.<!>length
|
||||
a.bar(null)?.length
|
||||
@@ -73,5 +73,5 @@ fun main(a: A) {
|
||||
|
||||
a.baz3()<!UNSAFE_CALL!>.<!>get(0).length
|
||||
a.baz3()!!.get(0).length
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.baz3()!!.get(0)<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
a.baz3()!!.get(0)<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
}
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ public class A {
|
||||
// FILE: main.kt
|
||||
fun main(a: A) {
|
||||
a.foo("").length
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>)<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
a.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>)<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
|
||||
a.bar("")<!UNSAFE_CALL!>.<!>length
|
||||
a.bar(null)?.length
|
||||
|
||||
compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jsr305/springNullableWithTypeUse.kt
Vendored
+3
-3
@@ -63,17 +63,17 @@ public class A {
|
||||
|
||||
// FILE: main.kt
|
||||
fun main(a: A) {
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.foo("", null)<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
a.foo("", null)<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
a.foo("", null).length
|
||||
a.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>, "").length
|
||||
|
||||
a.bar().length
|
||||
a.bar()<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>.length
|
||||
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.field<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
a.field<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
a.field.length
|
||||
|
||||
a.baz()<!UNSAFE_CALL!>.<!>get(0)
|
||||
a.baz()!!.get(0).get(0)
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.baz()!!.get(0)<!UNNECESSARY_SAFE_CALL!>?.<!>get(0)<!>
|
||||
a.baz()!!.get(0)<!UNNECESSARY_SAFE_CALL!>?.<!>get(0)
|
||||
}
|
||||
|
||||
+2
-2
@@ -58,10 +58,10 @@ public class A {
|
||||
// FILE: main.kt
|
||||
fun main(a: A) {
|
||||
a.foo("").length
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.foo(null)<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
a.foo(null)<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
|
||||
a.bar("").length
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.bar(null)<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
a.bar(null)<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
|
||||
a.baz1().get(0).length
|
||||
a.baz1()<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>.get(0).length
|
||||
|
||||
Vendored
+2
-2
@@ -58,7 +58,7 @@ public class A {
|
||||
// FILE: main.kt
|
||||
fun main(a: A) {
|
||||
a.foo("").length
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>)<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
a.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>)<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
|
||||
a.bar("")<!UNSAFE_CALL!>.<!>length
|
||||
a.bar(null)?.length
|
||||
@@ -73,5 +73,5 @@ fun main(a: A) {
|
||||
|
||||
a.baz3()<!UNSAFE_CALL!>.<!>get(0).length
|
||||
a.baz3()!!.get(0).length
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.baz3()!!.get(0)<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
a.baz3()!!.get(0)<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
}
|
||||
|
||||
+1
@@ -73,3 +73,4 @@ public abstract class MyList</*0*/ E : kotlin.Any!> : MyCollection<E!>, kotlin.c
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun </*0*/ T : kotlin.Any!> finishToArray(/*0*/ p0: kotlin.Array<(out) T!>!, /*1*/ p1: kotlin.collections.(Mutable)Iterator<*>!): kotlin.Array<(out) T!>!
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun hugeCapacity(/*0*/ p0: kotlin.Int): kotlin.Int
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
@@ -42,3 +42,4 @@ public/*package*/ open class Outer {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+3
-2
@@ -4,7 +4,7 @@ public final class A : BaseClass {
|
||||
public constructor A()
|
||||
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 loadCache(/*0*/ @org.checkerframework.checker.nullness.qual.NonNull vararg args: @org.checkerframework.checker.nullness.qual.NonNull kotlin.Any /*kotlin.Array<(out) @org.checkerframework.checker.nullness.qual.NonNull kotlin.Any>*/): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun loadCache(/*0*/ @org.checkerframework.checker.nullness.qual.NonNull vararg args: @org.checkerframework.checker.nullness.qual.NonNull kotlin.Any /*kotlin.Array<(out) @org.checkerframework.checker.nullness.qual.NonNull kotlin.Any>!*/): kotlin.Unit
|
||||
public open fun loadCache(/*0*/ vararg args: kotlin.Any? /*kotlin.Array<out kotlin.Any?>*/): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
@@ -21,6 +21,7 @@ public open class BaseClass {
|
||||
public constructor BaseClass()
|
||||
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 fun loadCache(/*0*/ @org.checkerframework.checker.nullness.qual.NonNull vararg args: @org.checkerframework.checker.nullness.qual.NonNull kotlin.Any /*kotlin.Array<(out) @org.checkerframework.checker.nullness.qual.NonNull kotlin.Any>*/): kotlin.Unit
|
||||
public open fun loadCache(/*0*/ @org.checkerframework.checker.nullness.qual.NonNull vararg args: @org.checkerframework.checker.nullness.qual.NonNull kotlin.Any /*kotlin.Array<(out) @org.checkerframework.checker.nullness.qual.NonNull kotlin.Any>!*/): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -10,5 +10,5 @@ public interface MapLike<@org.jetbrains.annotations.NotNull K> {
|
||||
|
||||
// FILE: main.kt
|
||||
fun test2(map : MapLike<Int>, x2: Int?) {
|
||||
map.put(<!NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>x2<!>)
|
||||
}
|
||||
map.put(<!TYPE_MISMATCH!>x2<!>)
|
||||
}
|
||||
|
||||
@@ -12,3 +12,4 @@ public open class A</*0*/ T : kotlin.Any!> {
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -12,3 +12,4 @@ public open class A</*0*/ T : kotlin.Any!> {
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
|
||||
@@ -12,3 +12,4 @@ public open class A</*0*/ T : kotlin.Any!> {
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
|
||||
@@ -12,3 +12,4 @@ public open class A</*0*/ T : kotlin.Any!> {
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
|
||||
@@ -12,3 +12,4 @@ public open class A</*0*/ T : kotlin.Any!> {
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ fun safeCalls() {
|
||||
val a = jsr.string?.length
|
||||
val b = jsrNullable?.string?.length
|
||||
|
||||
val c = <!SAFE_CALL_WILL_CHANGE_NULLABILITY!>jb.string<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
val c = jb.string<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
val d = jbNullable?.string?.length
|
||||
|
||||
val e = platform.string?.length
|
||||
|
||||
Vendored
+1
-1
@@ -64,7 +64,7 @@ fun safeCalls() {
|
||||
val a = jsr.string<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
val b = jsrNullable?.string?.length
|
||||
|
||||
val c = <!SAFE_CALL_WILL_CHANGE_NULLABILITY!>jb.string<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
val c = jb.string<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
val d = jbNullable?.string?.length
|
||||
|
||||
val e = platform.string?.length
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ fun main(a: A) {
|
||||
a.field.length
|
||||
a.field = null
|
||||
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.nonNullField<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
a.nonNullField<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
a.nonNullField.length
|
||||
a.nonNullField = <!NULL_FOR_NONNULL_TYPE!>null<!>
|
||||
}
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ fun main(a: A) {
|
||||
<!RECEIVER_NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>a.field<!>.length
|
||||
a.field = null
|
||||
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.nonNullField<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
a.nonNullField<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
a.nonNullField.length
|
||||
a.nonNullField = <!NULL_FOR_NONNULL_TYPE!>null<!>
|
||||
}
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ fun main(a: A) {
|
||||
a.field<!UNSAFE_CALL!>.<!>length
|
||||
a.field = null
|
||||
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.nonNullField<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
a.nonNullField<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
a.nonNullField.length
|
||||
a.nonNullField = <!NULL_FOR_NONNULL_TYPE!>null<!>
|
||||
}
|
||||
|
||||
+1
-1
@@ -97,7 +97,7 @@ public class A {
|
||||
|
||||
// FILE: main.kt
|
||||
fun main(a: A) {
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.foo("", null)<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
a.foo("", null)<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
a.foo("", null).length
|
||||
a.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>, "").length
|
||||
|
||||
|
||||
+1
-1
@@ -147,7 +147,7 @@ fun main(a: A, b: B, c: C) {
|
||||
c.foo2(<!NULL_FOR_NONNULL_TYPE!>null<!>).length
|
||||
c.foo3(<!NULL_FOR_NONNULL_TYPE!>null<!>).length
|
||||
c.bar1(null).length
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>c.bar1(null)<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
c.bar1(null)<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
c.bar2(null)<!UNSAFE_CALL!>.<!>length
|
||||
c.baz(<!NULL_FOR_NONNULL_TYPE!>null<!>).length
|
||||
}
|
||||
|
||||
+4
-4
@@ -127,7 +127,7 @@ public class A {
|
||||
|
||||
// FILE: main.kt
|
||||
fun main(a: A, b: A.B, c: A.C) {
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.foo("", null)<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
a.foo("", null)<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
a.foo("", null).length
|
||||
a.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>, "").length
|
||||
|
||||
@@ -137,7 +137,7 @@ fun main(a: A, b: A.B, c: A.C) {
|
||||
a.bar().length
|
||||
a.bar()<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>.length
|
||||
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.field<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
a.field<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
a.field.length
|
||||
|
||||
a.baz()<!UNSAFE_CALL!>.<!>get(0)
|
||||
@@ -150,7 +150,7 @@ fun main(a: A, b: A.B, c: A.C) {
|
||||
b.foo(null, "")<!UNSAFE_CALL!>.<!>length
|
||||
|
||||
b.foobar(<!NULL_FOR_NONNULL_TYPE!>null<!>, "").length
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>b.foobar("", null)<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
b.foobar("", null)<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
|
||||
b.bar()<!UNSAFE_CALL!>.<!>length
|
||||
b.bar()!!.length
|
||||
@@ -163,7 +163,7 @@ fun main(a: A, b: A.B, c: A.C) {
|
||||
b.baz()!!.get(0)?.get(0)
|
||||
|
||||
// c
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>c.foo("", null)<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
c.foo("", null)<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
c.foo("", null).length
|
||||
c.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>, "").length
|
||||
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ public class A {
|
||||
|
||||
// FILE: main.kt
|
||||
fun main(a: A) {
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.foo("", null)<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
a.foo("", null)<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
a.foo("", null).length
|
||||
a.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>, "").length
|
||||
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ public class A {
|
||||
|
||||
// FILE: main.kt
|
||||
fun main(a: test.A) {
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.foo("", null)<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
a.foo("", null)<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
a.foo("", null).length
|
||||
a.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>, "").length
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// SKIP_TXT
|
||||
// FILE: main.kt
|
||||
|
||||
sealed class ClientBootResult
|
||||
|
||||
object ClientBootSuccess : ClientBootResult()
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
package
|
||||
|
||||
public fun example(): Single<out ClientBootResult>
|
||||
|
||||
public sealed class ClientBootResult {
|
||||
protected constructor ClientBootResult()
|
||||
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 object ClientBootSuccess : ClientBootResult {
|
||||
private constructor ClientBootSuccess()
|
||||
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
|
||||
}
|
||||
|
||||
@FunctionalInterface /* annotation class not found */ public interface Function</*0*/ @io.reactivex.rxjava3.annotations.NonNull T : kotlin.Any!, /*1*/ @io.reactivex.rxjava3.annotations.NonNull R : kotlin.Any!> {
|
||||
public abstract fun apply(/*0*/ t: T!): R!
|
||||
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 open class Single</*0*/ @io.reactivex.rxjava3.annotations.NonNull T : kotlin.Any!> {
|
||||
public constructor Single</*0*/ @io.reactivex.rxjava3.annotations.NonNull T : kotlin.Any!>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
@io.reactivex.rxjava3.annotations.NonNull public final fun </*0*/ @io.reactivex.rxjava3.annotations.NonNull R : kotlin.Any!> map(/*0*/ @io.reactivex.rxjava3.annotations.NonNull mapper: @io.reactivex.rxjava3.annotations.NonNull Function<in T!, out R!>!): @io.reactivex.rxjava3.annotations.NonNull Single<R!>!
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
@io.reactivex.rxjava3.annotations.NonNull public open fun </*0*/ @io.reactivex.rxjava3.annotations.NonNull T : kotlin.Any!> just(/*0*/ item: T!): @io.reactivex.rxjava3.annotations.NonNull Single<T!>!
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
// MUTE_FOR_PSI_CLASS_FILES_READING
|
||||
// SKIP_TXT
|
||||
|
||||
// FILE: J1.java
|
||||
import io.reactivex.rxjava3.annotations.*;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// MUTE_FOR_PSI_CLASS_FILES_READING
|
||||
// SKIP_TXT
|
||||
|
||||
// FILE: J1.java
|
||||
import io.reactivex.rxjava3.annotations.*;
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
package
|
||||
|
||||
public fun main(): kotlin.Unit
|
||||
|
||||
public open class J1</*0*/ @io.reactivex.rxjava3.annotations.NonNull T : kotlin.Any!> {
|
||||
public constructor J1</*0*/ @io.reactivex.rxjava3.annotations.NonNull T : kotlin.Any!>()
|
||||
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
|
||||
}
|
||||
+2
-2
@@ -15,6 +15,6 @@ public class A {
|
||||
// FILE: main.kt
|
||||
fun main(a: A) {
|
||||
a.foo("").length
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.foo("")<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>a.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>)<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
a.foo("")<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
a.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>)<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
}
|
||||
|
||||
@@ -12,3 +12,4 @@ public open class A</*0*/ T : kotlin.Any!> {
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
|
||||
@@ -12,3 +12,4 @@ public open class A</*0*/ T : kotlin.Any!> {
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
|
||||
+25
-25
@@ -3,66 +3,66 @@
|
||||
// FIXME: rename identifiers.kt
|
||||
|
||||
// FILE: 1.kt
|
||||
package <!INVALID_CHARACTERS_NATIVE_WARNING!>`check.pkg`<!>
|
||||
package <!INVALID_CHARACTERS_NATIVE_ERROR!>`check.pkg`<!>
|
||||
|
||||
// FILE: 2.kt
|
||||
package totally.normal.pkg
|
||||
|
||||
class <!INVALID_CHARACTERS_NATIVE_WARNING!>`Check.Class`<!>
|
||||
class <!INVALID_CHARACTERS_NATIVE_ERROR!>`Check.Class`<!>
|
||||
class NormalClass {
|
||||
fun <!INVALID_CHARACTERS_NATIVE_WARNING!>`check$member`<!>() {}
|
||||
fun <!INVALID_CHARACTERS_NATIVE_ERROR!>`check$member`<!>() {}
|
||||
}
|
||||
|
||||
object <!INVALID_CHARACTERS_NATIVE_WARNING!>`Check;Object`<!>
|
||||
object <!INVALID_CHARACTERS_NATIVE_ERROR!>`Check;Object`<!>
|
||||
object NormalObject
|
||||
|
||||
data class Pair(val first: Int, val <!INVALID_CHARACTERS_NATIVE_WARNING!>`next,one`<!>: Int)
|
||||
data class Pair(val first: Int, val <!INVALID_CHARACTERS_NATIVE_ERROR!>`next,one`<!>: Int)
|
||||
|
||||
object Delegate {
|
||||
operator fun getValue(thisRef: Any?, property: kotlin.reflect.KProperty<*>): Any? = null
|
||||
}
|
||||
|
||||
fun <!INVALID_CHARACTERS_NATIVE_WARNING!>`check(function`<!>() {
|
||||
val <!INVALID_CHARACTERS_NATIVE_WARNING!>`check)variable`<!> = 1
|
||||
val <!INVALID_CHARACTERS_NATIVE_WARNING!>`check[delegated[variable`<!> by Delegate
|
||||
fun <!INVALID_CHARACTERS_NATIVE_ERROR!>`check(function`<!>() {
|
||||
val <!INVALID_CHARACTERS_NATIVE_ERROR!>`check)variable`<!> = 1
|
||||
val <!INVALID_CHARACTERS_NATIVE_ERROR!>`check[delegated[variable`<!> by Delegate
|
||||
|
||||
val normalVariable = 2
|
||||
val normalDelegatedVariable by Delegate
|
||||
|
||||
val (check, <!INVALID_CHARACTERS_NATIVE_WARNING!>`destructuring]declaration`<!>) = Pair(1, 2)
|
||||
val (check, <!INVALID_CHARACTERS_NATIVE_ERROR!>`destructuring]declaration`<!>) = Pair(1, 2)
|
||||
}
|
||||
|
||||
fun normalFunction() {}
|
||||
|
||||
val <!INVALID_CHARACTERS_NATIVE_WARNING!>`check{property`<!> = 1
|
||||
val <!INVALID_CHARACTERS_NATIVE_WARNING!>`check}delegated}property`<!> by Delegate
|
||||
val <!INVALID_CHARACTERS_NATIVE_ERROR!>`check{property`<!> = 1
|
||||
val <!INVALID_CHARACTERS_NATIVE_ERROR!>`check}delegated}property`<!> by Delegate
|
||||
val normalProperty = 2
|
||||
val normalDelegatedProperty by Delegate
|
||||
|
||||
fun checkValueParameter(<!INVALID_CHARACTERS_NATIVE_WARNING!>`check/parameter`<!>: Int) {}
|
||||
fun checkValueParameter(<!INVALID_CHARACTERS_NATIVE_ERROR!>`check/parameter`<!>: Int) {}
|
||||
|
||||
fun <<!INVALID_CHARACTERS_NATIVE_WARNING!>`check<type<parameter`<!>, normalTypeParameter> checkTypeParameter() {}
|
||||
fun <<!INVALID_CHARACTERS_NATIVE_ERROR!>`check<type<parameter`<!>, normalTypeParameter> checkTypeParameter() {}
|
||||
|
||||
enum class <!INVALID_CHARACTERS_NATIVE_WARNING!>`Check>Enum>Entry`<!> {
|
||||
<!INVALID_CHARACTERS_NATIVE_WARNING!>`CHECK:ENUM:ENTRY`<!>;
|
||||
enum class <!INVALID_CHARACTERS_NATIVE_ERROR!>`Check>Enum>Entry`<!> {
|
||||
<!INVALID_CHARACTERS_NATIVE_ERROR!>`CHECK:ENUM:ENTRY`<!>;
|
||||
}
|
||||
|
||||
typealias <!INVALID_CHARACTERS_NATIVE_WARNING!>`check\typealias`<!> = Any
|
||||
typealias <!INVALID_CHARACTERS_NATIVE_ERROR!>`check\typealias`<!> = Any
|
||||
|
||||
fun <!INVALID_CHARACTERS_NATIVE_WARNING!>`check&`<!>() {}
|
||||
fun <!INVALID_CHARACTERS_NATIVE_ERROR!>`check&`<!>() {}
|
||||
|
||||
fun <!INVALID_CHARACTERS_NATIVE_WARNING!>`check~`<!>() {}
|
||||
fun <!INVALID_CHARACTERS_NATIVE_ERROR!>`check~`<!>() {}
|
||||
|
||||
fun <!INVALID_CHARACTERS_NATIVE_WARNING!>`check*`<!>() {}
|
||||
fun <!INVALID_CHARACTERS_NATIVE_ERROR!>`check*`<!>() {}
|
||||
|
||||
fun <!INVALID_CHARACTERS_NATIVE_WARNING!>`check?`<!>() {}
|
||||
fun <!INVALID_CHARACTERS_NATIVE_ERROR!>`check?`<!>() {}
|
||||
|
||||
fun <!INVALID_CHARACTERS_NATIVE_WARNING!>`check#`<!>() {}
|
||||
fun <!INVALID_CHARACTERS_NATIVE_ERROR!>`check#`<!>() {}
|
||||
|
||||
fun <!INVALID_CHARACTERS_NATIVE_WARNING!>`check|`<!>() {}
|
||||
fun <!INVALID_CHARACTERS_NATIVE_ERROR!>`check|`<!>() {}
|
||||
|
||||
fun <!INVALID_CHARACTERS_NATIVE_WARNING!>`check§`<!>() {}
|
||||
fun <!INVALID_CHARACTERS_NATIVE_ERROR!>`check§`<!>() {}
|
||||
|
||||
fun <!INVALID_CHARACTERS_NATIVE_WARNING!>`check%`<!>() {}
|
||||
fun <!INVALID_CHARACTERS_NATIVE_ERROR!>`check%`<!>() {}
|
||||
|
||||
fun <!INVALID_CHARACTERS_NATIVE_WARNING!>`check@`<!>() {}
|
||||
fun <!INVALID_CHARACTERS_NATIVE_ERROR!>`check@`<!>() {}
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ package boundsWithSubstitutors
|
||||
class C : A<C>()
|
||||
|
||||
val a = B<C>()
|
||||
val a1 = B<<!UPPER_BOUND_VIOLATED!>Int<!>>()
|
||||
val a1 = B<<!UPPER_BOUND_VIOLATED, UPPER_BOUND_VIOLATED!>Int<!>>()
|
||||
|
||||
class X<A, B : A>()
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
fun bar(doIt: Int.() -> Int) {
|
||||
1.doIt()
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>1<!UNNECESSARY_SAFE_CALL!>?.<!>doIt()<!>
|
||||
1<!UNNECESSARY_SAFE_CALL!>?.<!>doIt()
|
||||
val i: Int? = 1
|
||||
<!ARGUMENT_TYPE_MISMATCH!>i<!>.doIt()
|
||||
i?.doIt()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
fun bar(doIt: Int.() -> Int) {
|
||||
1.doIt()
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>1<!UNNECESSARY_SAFE_CALL!>?.<!>doIt()<!>
|
||||
1<!UNNECESSARY_SAFE_CALL!>?.<!>doIt()
|
||||
val i: Int? = 1
|
||||
i<!UNSAFE_CALL!>.<!>doIt()
|
||||
i?.doIt()
|
||||
|
||||
@@ -82,6 +82,6 @@ fun test() {
|
||||
val i : Int? = null
|
||||
<!ARGUMENT_TYPE_MISMATCH!>i<!>.(fun Int.() = 1)();
|
||||
<!INAPPLICABLE_CANDIDATE!>{}<!><Int>()
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>1<!UNNECESSARY_SAFE_CALL!>?.<!>(<!UNRESOLVED_REFERENCE!>fun Int.() = 1<!>)()<!>
|
||||
1<!UNNECESSARY_SAFE_CALL!>?.<!>(<!UNRESOLVED_REFERENCE!>fun Int.() = 1<!>)()
|
||||
1.<!NO_RECEIVER_ALLOWED!>{}<!>()
|
||||
}
|
||||
|
||||
@@ -82,6 +82,6 @@ fun test() {
|
||||
val i : Int? = null
|
||||
i<!UNSAFE_CALL!>.<!>(fun Int.() = 1)();
|
||||
{}<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!><Int><!>()
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>1<!UNNECESSARY_SAFE_CALL!>?.<!>(fun Int.() = 1)()<!>
|
||||
1<!UNNECESSARY_SAFE_CALL!>?.<!>(fun Int.() = 1)()
|
||||
1.<!NO_RECEIVER_ALLOWED!>{}<!>()
|
||||
}
|
||||
|
||||
@@ -18,6 +18,6 @@ fun foo() {
|
||||
// these both also ok (with smart cast / unnecessary safe call)
|
||||
if (rule != null) {
|
||||
rule.apply()
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>rule<!UNNECESSARY_SAFE_CALL!>?.<!>apply()<!>
|
||||
rule<!UNNECESSARY_SAFE_CALL!>?.<!>apply()
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -18,6 +18,6 @@ fun foo() {
|
||||
// these both also ok (with smart cast / unnecessary safe call)
|
||||
if (rule != null) {
|
||||
<!DEBUG_INFO_SMARTCAST!>rule<!>.apply()
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>rule<!UNNECESSARY_SAFE_CALL!>?.<!>apply()<!>
|
||||
rule<!UNNECESSARY_SAFE_CALL!>?.<!>apply()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
|
||||
fun ff() {
|
||||
val i: Int = 1
|
||||
val a: Int? = <!SAFE_CALL_WILL_CHANGE_NULLABILITY!>i<!UNNECESSARY_SAFE_CALL!>?.<!>plus(2)<!>
|
||||
val a: Int? = i<!UNNECESSARY_SAFE_CALL!>?.<!>plus(2)
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,5 +2,5 @@ fun Int.gg() = null
|
||||
|
||||
fun ff() {
|
||||
val a: Int = 1
|
||||
val b: Int = <!INITIALIZER_TYPE_MISMATCH, SAFE_CALL_WILL_CHANGE_NULLABILITY, TYPE_MISMATCH!>a<!UNNECESSARY_SAFE_CALL!>?.<!>gg()<!>
|
||||
val b: Int = <!INITIALIZER_TYPE_MISMATCH, TYPE_MISMATCH!>a<!UNNECESSARY_SAFE_CALL!>?.<!>gg()<!>
|
||||
}
|
||||
|
||||
@@ -2,5 +2,5 @@ fun Int.gg() = null
|
||||
|
||||
fun ff() {
|
||||
val a: Int = 1
|
||||
val b: Int = <!SAFE_CALL_WILL_CHANGE_NULLABILITY, TYPE_MISMATCH!>a<!UNNECESSARY_SAFE_CALL!>?.<!>gg()<!>
|
||||
val b: Int = <!TYPE_MISMATCH!>a<!UNNECESSARY_SAFE_CALL!>?.<!>gg()<!>
|
||||
}
|
||||
|
||||
@@ -12,5 +12,5 @@ val s: String = "test"
|
||||
fun ff() {
|
||||
val a = <!NO_COMPANION_OBJECT!>Test<!><!UNEXPECTED_SAFE_CALL!>?.<!>FOO
|
||||
val b = <!EXPRESSION_EXPECTED_PACKAGE_FOUND!>foo<!><!UNEXPECTED_SAFE_CALL!>?.<!>s
|
||||
<!NO_COMPANION_OBJECT!>System<!><!UNEXPECTED_SAFE_CALL!>?.<!>out.println(a + b)
|
||||
<!NO_COMPANION_OBJECT!>System<!><!UNEXPECTED_SAFE_CALL!>?.<!>out<!UNSAFE_CALL!>.<!>println(a + b)
|
||||
}
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ fun test6() {}
|
||||
|
||||
annotation class AnnArray(val a: Array<String>)
|
||||
|
||||
@AnnArray(<!NON_VARARG_SPREAD_WARNING!>*<!>["/"])
|
||||
@AnnArray(<!NON_VARARG_SPREAD_ERROR!>*<!>["/"])
|
||||
fun testArray() {}
|
||||
|
||||
@Ann1(<!TYPE_MISMATCH, TYPE_MISMATCH!>[""]<!>)
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ fun test11() {
|
||||
|
||||
fun test12() {
|
||||
fun Any.bar(i: Int) {}
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>todo()<!UNREACHABLE_CODE!><!UNNECESSARY_SAFE_CALL!>?.<!>bar(1)<!><!>
|
||||
todo()<!UNREACHABLE_CODE!><!UNNECESSARY_SAFE_CALL!>?.<!>bar(1)<!>
|
||||
}
|
||||
|
||||
fun todo(): Nothing = throw Exception()
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ fun test11() {
|
||||
|
||||
fun test12() {
|
||||
fun Any.bar(<!UNUSED_PARAMETER!>i<!>: Int) {}
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>todo()<!UNNECESSARY_SAFE_CALL!>?.<!><!UNREACHABLE_CODE!>bar(1)<!><!>
|
||||
todo()<!UNNECESSARY_SAFE_CALL!>?.<!><!UNREACHABLE_CODE!>bar(1)<!>
|
||||
}
|
||||
|
||||
fun todo(): Nothing = throw Exception()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
val a by <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_WARNING, TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_WARNING!>a<!>
|
||||
val a by <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_ERROR, TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_ERROR!>a<!>
|
||||
|
||||
val b by Delegate(<!DEBUG_INFO_MISSING_UNRESOLVED, TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_ERROR!>b<!>)
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ val bar2 by <!DEBUG_INFO_MISSING_UNRESOLVED!>bar2<!>()
|
||||
package lt.neworld.compiler
|
||||
|
||||
class Foo {
|
||||
val bar by <!TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_WARNING, TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_WARNING!><!DEBUG_INFO_MISSING_UNRESOLVED!>bar<!>()<!>
|
||||
val bar by <!TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_ERROR, TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_ERROR!><!DEBUG_INFO_MISSING_UNRESOLVED!>bar<!>()<!>
|
||||
}
|
||||
|
||||
// FILE: lt/neworld/compiler/bar/Bar.kt
|
||||
|
||||
@@ -24,7 +24,7 @@ infix fun filter(filter: (R, Any?) -> Boolean): Delegate<R, T>
|
||||
}
|
||||
|
||||
class GitLabChangesProcessor: DatabaseEntity {
|
||||
var buildProcessors by <!DEBUG_INFO_EXPRESSION_TYPE("Delegate<GitLabChangesProcessor, kotlin.collections.MutableCollection<GitLabBuildProcessor>>"), TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_WARNING!>child_many(
|
||||
var buildProcessors by <!DEBUG_INFO_EXPRESSION_TYPE("Delegate<GitLabChangesProcessor, kotlin.collections.MutableCollection<GitLabBuildProcessor>>"), TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_ERROR!>child_many(
|
||||
GitLabBuildProcessor::class.java,
|
||||
GitLabBuildProcessor::processor
|
||||
)<!>
|
||||
@@ -32,4 +32,4 @@ class GitLabChangesProcessor: DatabaseEntity {
|
||||
|
||||
fun <Self : DatabaseEntity, Target : DatabaseEntity> Self.child_many(
|
||||
clazz: Class<Target>, property: KProperty1<Target, Self?>, name: String = property.name
|
||||
): Delegate<Self, MutableCollection<Target>> = TODO() // Type checking has run into a recursive problem. Easiest workaround: specify types of your declarations explicitly
|
||||
): Delegate<Self, MutableCollection<Target>> = TODO() // Type checking has run into a recursive problem. Easiest workaround: specify types of your declarations explicitly
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
private enum class Foo { A, B }
|
||||
|
||||
class Bar(<!EXPOSED_PARAMETER_TYPE!>val <!EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_WARNING!>foo<!>: Foo<!>)
|
||||
class Bar(<!EXPOSED_PARAMETER_TYPE!>val <!EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR!>foo<!>: Foo<!>)
|
||||
|
||||
@@ -6,7 +6,7 @@ public interface Your: <!EXPOSED_SUPER_INTERFACE!>My<!> {
|
||||
fun <T: Base> foo(): T
|
||||
}
|
||||
|
||||
public class Derived<T: <!EXPOSED_TYPE_PARAMETER_BOUND!>My<!>>(<!EXPOSED_PARAMETER_TYPE!>val <!EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_WARNING!>x<!>: My<!>): <!EXPOSED_SUPER_CLASS!>Base<!>() {
|
||||
public class Derived<T: <!EXPOSED_TYPE_PARAMETER_BOUND!>My<!>>(<!EXPOSED_PARAMETER_TYPE!>val <!EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR!>x<!>: My<!>): <!EXPOSED_SUPER_CLASS!>Base<!>() {
|
||||
|
||||
constructor(<!EXPOSED_PARAMETER_TYPE!>xx: My?<!>, <!EXPOSED_PARAMETER_TYPE!>x: My<!>): this(xx ?: x)
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ fun <T: Any, E> T.foo(x : E, y : A) : T {
|
||||
y plus 1
|
||||
y + 1.0
|
||||
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>this<!UNNECESSARY_SAFE_CALL!>?.<!>minus<T>(this)<!>
|
||||
this<!UNNECESSARY_SAFE_CALL!>?.<!>minus<T>(this)
|
||||
|
||||
return this
|
||||
}
|
||||
@@ -69,7 +69,7 @@ import outer.*
|
||||
command?.equals1(null)
|
||||
|
||||
val c = Command()
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>c<!UNNECESSARY_SAFE_CALL!>?.<!>equals2(null)<!>
|
||||
c<!UNNECESSARY_SAFE_CALL!>?.<!>equals2(null)
|
||||
|
||||
if (command == null) 1
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ fun <T: Any, E> T.foo(x : E, y : A) : T {
|
||||
y plus 1
|
||||
y + 1.0
|
||||
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>this<!UNNECESSARY_SAFE_CALL!>?.<!>minus<T>(this)<!>
|
||||
this<!UNNECESSARY_SAFE_CALL!>?.<!>minus<T>(this)
|
||||
|
||||
return this
|
||||
}
|
||||
@@ -69,7 +69,7 @@ import outer.*
|
||||
command?.equals1(null)
|
||||
|
||||
val c = Command()
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>c<!UNNECESSARY_SAFE_CALL!>?.<!>equals2(null)<!>
|
||||
c<!UNNECESSARY_SAFE_CALL!>?.<!>equals2(null)
|
||||
|
||||
if (command == null) 1
|
||||
}
|
||||
|
||||
@@ -9,3 +9,4 @@ public interface Predicate</*0*/ T : kotlin.CharSequence!> {
|
||||
public abstract operator fun invoke(/*0*/ @org.jetbrains.annotations.NotNull t: T): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ class Inv<T>() {
|
||||
fun testInOut() {
|
||||
In<String>().f("1");
|
||||
(null <!CAST_NEVER_SUCCEEDS!>as<!> In<<!REDUNDANT_PROJECTION!>in<!> String>).f("1")
|
||||
(null <!CAST_NEVER_SUCCEEDS!>as<!> In<*>).<!NONE_APPLICABLE!>f<!>("1") // Wrong Arg
|
||||
(null <!CAST_NEVER_SUCCEEDS!>as<!> In<*>).f(<!TYPE_MISMATCH!>"1"<!>) // Wrong Arg
|
||||
|
||||
In<String>().f(1);
|
||||
(null <!CAST_NEVER_SUCCEEDS!>as<!> In<<!REDUNDANT_PROJECTION!>in<!> String>).f(1)
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
// !CHECK_TYPE
|
||||
// Incorrect "type mismatch" error for generic extension safe call (required not-null, found nullable)
|
||||
|
||||
// FILE: B.java
|
||||
|
||||
public class B<T> {
|
||||
public String gav() {
|
||||
return "";
|
||||
}
|
||||
|
||||
public static <T> B<T> create() {
|
||||
return new B();
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: A.kt
|
||||
|
||||
class A<T> {
|
||||
fun gav() = ""
|
||||
}
|
||||
fun <R> foo(x: R) = x
|
||||
fun <T> A<T>.bar() = ""
|
||||
fun <T> B<T>.bar() = ""
|
||||
|
||||
fun foo(l: A<String>?) {
|
||||
// No errors should be here
|
||||
foo(l?.bar()) checkType { _<String?>() }
|
||||
foo(l?.gav()) checkType { _<String?>() }
|
||||
if (l != null) {
|
||||
foo(<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>l<!UNNECESSARY_SAFE_CALL!>?.<!>bar()<!>) checkType { <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>_<!><String>() }
|
||||
foo(<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>l<!UNNECESSARY_SAFE_CALL!>?.<!>gav()<!>) checkType { <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>_<!><String>() }
|
||||
}
|
||||
}
|
||||
|
||||
fun fooNotNull(l: A<String>) {
|
||||
// No errors should be here
|
||||
foo(<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>l<!UNNECESSARY_SAFE_CALL!>?.<!>bar()<!>) checkType { <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>_<!><String>() }
|
||||
foo(<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>l<!UNNECESSARY_SAFE_CALL!>?.<!>gav()<!>) checkType { <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>_<!><String>() }
|
||||
}
|
||||
|
||||
fun bar() {
|
||||
val l = B.create<String>()
|
||||
foo(l?.bar()) checkType { _<String?>() }
|
||||
foo(l?.gav()) checkType { _<String?>() }
|
||||
}
|
||||
|
||||
+5
-5
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !CHECK_TYPE
|
||||
// Incorrect "type mismatch" error for generic extension safe call (required not-null, found nullable)
|
||||
|
||||
@@ -27,15 +28,15 @@ fun foo(l: A<String>?) {
|
||||
foo(l?.bar()) checkType { _<String?>() }
|
||||
foo(l?.gav()) checkType { _<String?>() }
|
||||
if (l != null) {
|
||||
foo(<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>l<!UNNECESSARY_SAFE_CALL!>?.<!>bar()<!>) checkType { _<String>() }
|
||||
foo(<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>l<!UNNECESSARY_SAFE_CALL!>?.<!>gav()<!>) checkType { _<String>() }
|
||||
foo(l<!UNNECESSARY_SAFE_CALL!>?.<!>bar()) checkType { <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>_<!><String>() }
|
||||
foo(l<!UNNECESSARY_SAFE_CALL!>?.<!>gav()) checkType { <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>_<!><String>() }
|
||||
}
|
||||
}
|
||||
|
||||
fun fooNotNull(l: A<String>) {
|
||||
// No errors should be here
|
||||
foo(<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>l<!UNNECESSARY_SAFE_CALL!>?.<!>bar()<!>) checkType { _<String>() }
|
||||
foo(<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>l<!UNNECESSARY_SAFE_CALL!>?.<!>gav()<!>) checkType { _<String>() }
|
||||
foo(l<!UNNECESSARY_SAFE_CALL!>?.<!>bar()) checkType { <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>_<!><String>() }
|
||||
foo(l<!UNNECESSARY_SAFE_CALL!>?.<!>gav()) checkType { <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>_<!><String>() }
|
||||
}
|
||||
|
||||
fun bar() {
|
||||
@@ -43,4 +44,3 @@ fun bar() {
|
||||
foo(l?.bar()) checkType { _<String?>() }
|
||||
foo(l?.gav()) checkType { _<String?>() }
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ fun <T : CharSequence?> foo(x: T) {
|
||||
if (<!SENSELESS_COMPARISON!>x != null<!>) {}
|
||||
|
||||
x.length
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>x<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
x<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
|
||||
x.bar1()
|
||||
x.bar2()
|
||||
@@ -20,14 +20,14 @@ fun <T : CharSequence?> foo(x: T) {
|
||||
x.bar4()
|
||||
|
||||
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>x<!UNNECESSARY_SAFE_CALL!>?.<!>bar1()<!>
|
||||
x<!UNNECESSARY_SAFE_CALL!>?.<!>bar1()
|
||||
}
|
||||
|
||||
x<!UNSAFE_CALL!>.<!>length
|
||||
|
||||
if (x is String) {
|
||||
x.length
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>x<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
x<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
|
||||
x.bar1()
|
||||
x.bar2()
|
||||
@@ -36,7 +36,7 @@ fun <T : CharSequence?> foo(x: T) {
|
||||
|
||||
if (x is CharSequence) {
|
||||
x.length
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>x<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
x<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
|
||||
x.bar1()
|
||||
x.bar2()
|
||||
|
||||
@@ -12,7 +12,7 @@ fun <T : CharSequence?> foo(x: T) {
|
||||
if (<!SENSELESS_COMPARISON!>x != null<!>) {}
|
||||
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>x<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
x<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.bar1()
|
||||
x.bar2()
|
||||
@@ -20,14 +20,14 @@ fun <T : CharSequence?> foo(x: T) {
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.bar4()
|
||||
|
||||
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>x<!UNNECESSARY_SAFE_CALL!>?.<!>bar1()<!>
|
||||
x<!UNNECESSARY_SAFE_CALL!>?.<!>bar1()
|
||||
}
|
||||
|
||||
x<!UNSAFE_CALL!>.<!>length
|
||||
|
||||
if (x is String) {
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>x<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
x<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.bar1()
|
||||
x.bar2()
|
||||
@@ -36,7 +36,7 @@ fun <T : CharSequence?> foo(x: T) {
|
||||
|
||||
if (x is CharSequence) {
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>x<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
x<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.bar1()
|
||||
x.bar2()
|
||||
|
||||
+3
-3
@@ -11,7 +11,7 @@ fun <T : String?> T.foo() {
|
||||
if (<!SENSELESS_COMPARISON!>this != null<!>) {}
|
||||
|
||||
length
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>this<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
this<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
|
||||
bar1()
|
||||
bar2()
|
||||
@@ -19,14 +19,14 @@ fun <T : String?> T.foo() {
|
||||
bar4()
|
||||
|
||||
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>this<!UNNECESSARY_SAFE_CALL!>?.<!>bar1()<!>
|
||||
this<!UNNECESSARY_SAFE_CALL!>?.<!>bar1()
|
||||
}
|
||||
|
||||
<!UNSAFE_CALL!>length<!>
|
||||
|
||||
if (this is String) {
|
||||
length
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>this<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
this<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
|
||||
bar1()
|
||||
bar2()
|
||||
|
||||
+3
-3
@@ -11,7 +11,7 @@ fun <T : String?> T.foo() {
|
||||
if (<!SENSELESS_COMPARISON!>this != null<!>) {}
|
||||
|
||||
<!DEBUG_INFO_IMPLICIT_RECEIVER_SMARTCAST!>length<!>
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>this<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
this<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
|
||||
<!DEBUG_INFO_IMPLICIT_RECEIVER_SMARTCAST!>bar1<!>()
|
||||
bar2()
|
||||
@@ -19,14 +19,14 @@ fun <T : String?> T.foo() {
|
||||
<!DEBUG_INFO_IMPLICIT_RECEIVER_SMARTCAST!>bar4<!>()
|
||||
|
||||
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>this<!UNNECESSARY_SAFE_CALL!>?.<!>bar1()<!>
|
||||
this<!UNNECESSARY_SAFE_CALL!>?.<!>bar1()
|
||||
}
|
||||
|
||||
<!UNSAFE_CALL!>length<!>
|
||||
|
||||
if (this is String) {
|
||||
<!DEBUG_INFO_IMPLICIT_RECEIVER_SMARTCAST!>length<!>
|
||||
<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>this<!UNNECESSARY_SAFE_CALL!>?.<!>length<!>
|
||||
this<!UNNECESSARY_SAFE_CALL!>?.<!>length
|
||||
|
||||
<!DEBUG_INFO_IMPLICIT_RECEIVER_SMARTCAST!>bar1<!>()
|
||||
bar2()
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@ fun foo2(a: A<out CharSequence>, b: A<in CharSequence>) {
|
||||
|
||||
a.foo2(Inv())
|
||||
a.foo2(<!TYPE_MISMATCH!>Inv<CharSequence>()<!>)
|
||||
a.foo2<<!UPPER_BOUND_VIOLATED!>Inv<CharSequence><!>>(<!TYPE_MISMATCH!>Inv()<!>)
|
||||
a.foo2<<!UPPER_BOUND_VIOLATED!>Inv<CharSequence><!>>(<!TYPE_MISMATCH, TYPE_MISMATCH, TYPE_MISMATCH!>Inv()<!>)
|
||||
|
||||
a.foo3(In())
|
||||
a.foo3(In<CharSequence>())
|
||||
@@ -32,7 +32,7 @@ fun foo2(a: A<out CharSequence>, b: A<in CharSequence>) {
|
||||
|
||||
b.foo2(Inv())
|
||||
b.foo2(<!TYPE_MISMATCH!>Inv<CharSequence>()<!>)
|
||||
b.foo2<<!UPPER_BOUND_VIOLATED!>Inv<CharSequence><!>>(<!TYPE_MISMATCH!>Inv()<!>)
|
||||
b.foo2<<!UPPER_BOUND_VIOLATED!>Inv<CharSequence><!>>(<!TYPE_MISMATCH, TYPE_MISMATCH, TYPE_MISMATCH!>Inv()<!>)
|
||||
|
||||
|
||||
b.foo3(<!TYPE_MISMATCH!>In<CharSequence>()<!>)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user