JS: prohibit to implement functional interfaces. See KT-15136

This commit is contained in:
Alexey Andreev
2016-12-19 13:12:33 +03:00
parent 822e58ad83
commit 84f094c770
10 changed files with 84 additions and 3 deletions
@@ -1,4 +1,6 @@
//KT-3190 Compiler crash if function called 'invoke' calls a closure
// IGNORE_BACKEND: JS
// JS backend does not allow to implement Function{N} interfaces
fun box(): String {
val test = Cached<Int,Int>({ it + 2 })
@@ -1,4 +1,6 @@
//KT-3822 Compiler crashes when use invoke convention with `this` in class which extends Function0<T>
// IGNORE_BACKEND: JS
// JS backend does not allow to implement Function{N} interfaces
class B() : Function0<Boolean> {
override fun invoke() = true