K1: report swallowed diagnostic about receiver type mismatch
#KT-55056 Fixed
This commit is contained in:
committed by
Space Team
parent
176325eaa7
commit
bd27ec840c
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
/inconsistentTypeInference.kt:7:17: error: constraint error in receiver type argument: inferred type is String but Int was expected
|
||||
println(plus(1)[0])
|
||||
^
|
||||
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// !RENDER_DIAGNOSTICS_FULL_TEXT
|
||||
// FIR_DUMP
|
||||
|
||||
fun foo() {
|
||||
buildList {
|
||||
add("Boom")
|
||||
println(plus(1)[0])
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
FILE: inconsistentTypeInference.fir.kt
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
R|kotlin/collections/buildList|<R|kotlin/String|>(<L> = buildList@fun R|kotlin/collections/MutableList<kotlin/String>|.<anonymous>(): R|kotlin/Unit| <inline=Inline, kind=EXACTLY_ONCE> {
|
||||
this@R|special/anonymous|.R|SubstitutionOverride<kotlin/collections/MutableList.add: R|kotlin/Boolean|>|(String(Boom))
|
||||
R|kotlin/io/println|(this@R|special/anonymous|.R|kotlin/collections/plus|<R|kotlin/Int|>(Int(1)).R|SubstitutionOverride<kotlin/collections/List.get: R|kotlin/Int|>|(Int(0)))
|
||||
}
|
||||
)
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// !RENDER_DIAGNOSTICS_FULL_TEXT
|
||||
// FIR_DUMP
|
||||
|
||||
fun foo() {
|
||||
buildList {
|
||||
add("Boom")
|
||||
println(<!RECEIVER_TYPE_MISMATCH!>plus<!>(1)[0])
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
/inconsistentTypeInference2.kt:7:17: error: type mismatch: inferred type is String but Int was expected
|
||||
println(this.plus(1)[0])
|
||||
^
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// !RENDER_DIAGNOSTICS_FULL_TEXT
|
||||
// FIR_DUMP
|
||||
|
||||
fun bar() {
|
||||
buildList {
|
||||
add("Boom")
|
||||
println(this.plus(1)[0])
|
||||
}
|
||||
}
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
FILE: inconsistentTypeInference2.fir.kt
|
||||
public final fun bar(): R|kotlin/Unit| {
|
||||
R|kotlin/collections/buildList|<R|kotlin/String|>(<L> = buildList@fun R|kotlin/collections/MutableList<kotlin/String>|.<anonymous>(): R|kotlin/Unit| <inline=Inline, kind=EXACTLY_ONCE> {
|
||||
this@R|special/anonymous|.R|SubstitutionOverride<kotlin/collections/MutableList.add: R|kotlin/Boolean|>|(String(Boom))
|
||||
R|kotlin/io/println|(this@R|special/anonymous|.R|kotlin/collections/plus|<R|kotlin/Int|>(Int(1)).R|SubstitutionOverride<kotlin/collections/List.get: R|kotlin/Int|>|(Int(0)))
|
||||
}
|
||||
)
|
||||
}
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// !RENDER_DIAGNOSTICS_FULL_TEXT
|
||||
// FIR_DUMP
|
||||
|
||||
fun bar() {
|
||||
buildList {
|
||||
add("Boom")
|
||||
println(<!TYPE_MISMATCH!>this<!>.plus(1)[0])
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user