JS: added tests for recursion cycle in inline functions
This commit is contained in:
+7
@@ -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()<!>
|
||||
+5
@@ -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
|
||||
+7
@@ -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()<!>
|
||||
+5
@@ -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
|
||||
+7
@@ -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()<!>
|
||||
+5
@@ -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
|
||||
+6
@@ -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()<!> }<!>
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
package
|
||||
|
||||
kotlin.inline() internal fun f(): kotlin.Unit
|
||||
kotlin.inline() internal fun g(): kotlin.Unit
|
||||
Reference in New Issue
Block a user