Add test for KT-19128
It looks like the problem was caused by incorrect merging of
StrictBasicValues and was fixed by commit
904c7f9c64.
#KT-19128 Fixed
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
class A
|
||||
|
||||
class B
|
||||
|
||||
class C
|
||||
|
||||
fun foo(parameters: Any?): Any? {
|
||||
var payload: Any? = null
|
||||
|
||||
if (parameters != null) {
|
||||
if (parameters is A || parameters is B) {
|
||||
payload = parameters
|
||||
} else {
|
||||
payload = "O"
|
||||
}
|
||||
}
|
||||
|
||||
if (payload is String) {
|
||||
payload += "K"
|
||||
}
|
||||
|
||||
return payload
|
||||
}
|
||||
|
||||
fun box(): String =
|
||||
"${foo(C())}"
|
||||
Reference in New Issue
Block a user