KT-4119: Back-end (JVM) Internal error on code with local extensions

#KT-4119 Fixed
This commit is contained in:
Mikhael Bogdanov
2013-10-24 16:32:56 +04:00
parent 88a43fac5f
commit 604be8e0c1
4 changed files with 48 additions and 0 deletions
@@ -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"
}