Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/selfCall.kt
T
Denis Zharkov 855a0b3493 Force type calculation for local function if it should be inferred
It helps to catch TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM errors
because they appear after return type calculation began

 #KT-6271 Fixed
 #KT-3272 Obsolete
2016-01-29 14:36:53 +03:00

9 lines
264 B
Kotlin
Vendored

fun foo() {
fun bar1() = <!TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM!>bar1()<!>
fun bar2() = 1 + <!TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM!>bar2()<!>
fun bar3() = id(<!TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM!>bar3()<!>)
}
fun <T> id(x: T) = x