Capture flexible intersection types properly: take into account both bounds and use the same captured arguments for them
^KT-41693 Fixed
This commit is contained in:
+27
@@ -0,0 +1,27 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
// FILE: Bar.java
|
||||
public class Bar {
|
||||
public static String bar() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
fun foo(): Any? {
|
||||
return if (true) {
|
||||
if (true) {
|
||||
Bar.bar()
|
||||
} else {
|
||||
1
|
||||
}
|
||||
} else {
|
||||
1
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String? {
|
||||
foo()
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user