[NI] Fix 'only input type' check for intersection types
Check worked incorrectly in case when argument type and expected type are the same intersection type, which is possible for local variables without explicit type declaration.
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
fun test() {
|
||||
val u = when (true) {
|
||||
true -> 42
|
||||
else -> 1.0
|
||||
}
|
||||
|
||||
assertEquals(42, u)
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
Reference in New Issue
Block a user