FIR: Mark a pack of tests (53) as FIR_IDENTICAL
This commit is contained in:
committed by
teamcityserver
parent
ddbdfafa79
commit
dac9d7b17a
-33
@@ -1,33 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// NI_EXPECTED_FILE
|
||||
|
||||
interface First {
|
||||
fun first() {}
|
||||
}
|
||||
interface Second
|
||||
interface Third
|
||||
interface Fourth
|
||||
|
||||
fun chained1(arg: First) = run {
|
||||
if (arg !is Second) throw Exception()
|
||||
arg
|
||||
}.let { third ->
|
||||
if (third !is Third) throw Exception()
|
||||
third
|
||||
}
|
||||
|
||||
fun chained2(arg: First) = run {
|
||||
if (arg !is Second) throw Exception()
|
||||
arg
|
||||
}.let { third ->
|
||||
if (third !is Third) throw Exception()
|
||||
third
|
||||
}.let { fourth ->
|
||||
if (fourth !is Fourth) throw Exception()
|
||||
fourth
|
||||
}
|
||||
|
||||
fun test(arg: First) {
|
||||
chained1(arg).<!UNRESOLVED_REFERENCE!>first<!>()
|
||||
chained2(arg).<!UNRESOLVED_REFERENCE!>first<!>()
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// NI_EXPECTED_FILE
|
||||
|
||||
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// NI_EXPECTED_FILE
|
||||
|
||||
interface Base {
|
||||
fun base() {}
|
||||
}
|
||||
interface Base2
|
||||
interface One : Base, Base2
|
||||
interface Two : Base, Base2
|
||||
|
||||
fun <S: Base> intersectNullable(vararg elements: S): S? = TODO()
|
||||
|
||||
fun smartCastAfterIntersection(a: One, b: Two) = run {
|
||||
val v = intersectNullable(a, b)
|
||||
if (v == null) throw Exception()
|
||||
v
|
||||
}
|
||||
|
||||
fun test(one: One, two: Two) {
|
||||
smartCastAfterIntersection(one, two)<!UNNECESSARY_SAFE_CALL!>?.<!><!UNRESOLVED_REFERENCE!>base<!>()
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// NI_EXPECTED_FILE
|
||||
|
||||
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// NI_EXPECTED_FILE
|
||||
|
||||
interface Base {
|
||||
fun base() {}
|
||||
}
|
||||
interface Base2 : Base3
|
||||
interface Base3
|
||||
interface One : Base, Base2
|
||||
interface Two : Base, Base2
|
||||
interface Three : Base, Base3
|
||||
|
||||
object O1 : One
|
||||
object O2 : Two
|
||||
object O3 : Three
|
||||
|
||||
fun <S: Base> intersect(vararg elements: S): S = TODO()
|
||||
fun <S> intersectNoBound(vararg elements: S): S = TODO()
|
||||
|
||||
fun some(a: One, b: Two, c: Three) = intersectNoBound(intersect(a, b), c)
|
||||
|
||||
fun test(arg: Base, arg2: Base) {
|
||||
some(O1, O2, O3).<!UNRESOLVED_REFERENCE!>base<!>()
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// NI_EXPECTED_FILE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user