FIR: Preserve non-custom attributes after substitution
The test is being fixed since synthetic call for elvis has @Exact-attribute on return type
This commit is contained in:
committed by
teamcityserver
parent
e26abbbbb0
commit
883b18a0c6
@@ -0,0 +1,29 @@
|
||||
// FIR_IDENTICAL
|
||||
// SKIP_TXT
|
||||
interface SelectBuilder<in X> {
|
||||
fun foo(block: () -> X)
|
||||
}
|
||||
|
||||
fun <R> select1(builder: SelectBuilder<R>.() -> Unit): R = TODO()
|
||||
fun <F> select2(builder: SelectBuilder<F>.() -> Unit): F = TODO()
|
||||
fun <Q> myRun(builder: () -> Q): Q = TODO()
|
||||
|
||||
fun <H> bar(w1: H?, w2: H?) {
|
||||
val h1: H = myRun {
|
||||
select1 {
|
||||
foo { w1 }
|
||||
} ?: select2 {
|
||||
foo { w2 }
|
||||
} ?: throw RuntimeException()
|
||||
}
|
||||
|
||||
val h2: H = try {
|
||||
select1 {
|
||||
foo { w1 }
|
||||
} ?: select2 {
|
||||
foo { w2 }
|
||||
} ?: throw RuntimeException()
|
||||
} catch (t: Throwable) {
|
||||
throw RuntimeException()
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -13,5 +13,5 @@ fun test() {
|
||||
val r2 = map.getOrDefault_Exact("y", null as Int?)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>r2<!>
|
||||
|
||||
map.getOrDefault_Exact("y", "string")
|
||||
map.getOrDefault_Exact("y", <!ARGUMENT_TYPE_MISMATCH!>"string"<!>)
|
||||
}
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ fun <T> test3(t1: @kotlin.internal.NoInfer T): T = t1
|
||||
fun usage() {
|
||||
test1(1, "312")
|
||||
1.test2("")
|
||||
test3("")
|
||||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>test3<!>("")
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
|
||||
Reference in New Issue
Block a user