JS: added tests for recursion cycle in inline functions

This commit is contained in:
Alexey Tsvetkov
2015-03-10 14:59:43 +03:00
parent 24f2121f9b
commit b5797eb15b
13 changed files with 177 additions and 0 deletions
@@ -0,0 +1,7 @@
// !DIAGNOSTICS: -NOTHING_TO_INLINE
inline fun f(): Unit = <!INLINE_CALL_CYCLE!>g()<!>
inline fun g(): Unit = <!INLINE_CALL_CYCLE!>h()<!>
inline fun h(): Unit = <!INLINE_CALL_CYCLE!>f()<!>
@@ -0,0 +1,5 @@
package
kotlin.inline() internal fun f(): kotlin.Unit
kotlin.inline() internal fun g(): kotlin.Unit
kotlin.inline() internal fun h(): kotlin.Unit
@@ -0,0 +1,7 @@
// !DIAGNOSTICS: -NOTHING_TO_INLINE
inline fun f(): Unit = <!INLINE_CALL_CYCLE!>g()<!>
inline fun g(): Unit = <!INLINE_CALL_CYCLE!>h { <!INLINE_CALL_CYCLE!>f()<!> }<!>
inline fun h(fn: ()->Unit): Unit = <!INLINE_CALL_CYCLE!>fn()<!>
@@ -0,0 +1,5 @@
package
kotlin.inline() internal fun f(): kotlin.Unit
kotlin.inline() internal fun g(): kotlin.Unit
kotlin.inline() internal fun h(/*0*/ fn: () -> kotlin.Unit): kotlin.Unit
@@ -0,0 +1,7 @@
// !DIAGNOSTICS: -NOTHING_TO_INLINE
public inline fun f():Unit = <!INLINE_CALL_CYCLE!>g()<!>
public inline fun g(): Unit = <!INLINE_CALL_CYCLE!>h()<!>
public inline fun h(): Unit = <!INLINE_CALL_CYCLE!>f()<!>
@@ -0,0 +1,5 @@
package
kotlin.inline() public fun f(): kotlin.Unit
kotlin.inline() public fun g(): kotlin.Unit
kotlin.inline() public fun h(): kotlin.Unit
@@ -0,0 +1,6 @@
// !DIAGNOSTICS: -NOTHING_TO_INLINE
inline fun f(): Unit = <!INLINE_CALL_CYCLE!>g()<!>
inline fun g(): Unit = <!INLINE_CALL_CYCLE!>run { <!INLINE_CALL_CYCLE!>f()<!> }<!>
@@ -0,0 +1,4 @@
package
kotlin.inline() internal fun f(): kotlin.Unit
kotlin.inline() internal fun g(): kotlin.Unit