KT-4119: Back-end (JVM) Internal error on code with local extensions
#KT-4119 Fixed
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
fun foo(f: (Int?) -> Int): Int {
|
||||
return f(0)
|
||||
}
|
||||
|
||||
fun box() : String {
|
||||
fun Int?.plus(a:Int) : Int = a!! + 2
|
||||
|
||||
if (foo { it + 1} != 3) return "Fail 1"
|
||||
if (foo { it plus 1} != 3) return "Fail 2"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fun box(): String {
|
||||
fun Int.foo(a: Int): Int = a + 2
|
||||
|
||||
val s = object {
|
||||
fun test(): Int {
|
||||
return 1 foo 1
|
||||
}
|
||||
}
|
||||
|
||||
fun local(): Int {
|
||||
return 1 foo 1
|
||||
}
|
||||
|
||||
if (s.test() != 3) return "Fail"
|
||||
|
||||
if (local() != 3) return "Fail"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user