All tests for TCO moved to box (with diagnostics marked up)
This commit is contained in:
@@ -0,0 +1,10 @@
|
|||||||
|
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||||
|
tailRecursive fun Int.foo(x: Int) {
|
||||||
|
if (x == 0) return
|
||||||
|
return 1.foo(x - 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
1.foo(1000000)
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
+5
@@ -1,3 +1,8 @@
|
|||||||
<!NO_TAIL_CALLS_FOUND!>tailRecursive fun noTails()<!> {
|
<!NO_TAIL_CALLS_FOUND!>tailRecursive fun noTails()<!> {
|
||||||
// nothing here
|
// nothing here
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
noTails()
|
||||||
|
return "OK"
|
||||||
}
|
}
|
||||||
+7
-2
@@ -1,12 +1,17 @@
|
|||||||
tailRecursive fun badTails(x : Int) : Int {
|
tailRecursive fun badTails(x : Int) : Int {
|
||||||
if (x > 0) {
|
if (x < 50 && x != 10 && x > 0) {
|
||||||
return 1 + <!NON_TAIL_RECURSIVE_CALL!>badTails<!>(x - 1)
|
return 1 + <!NON_TAIL_RECURSIVE_CALL!>badTails<!>(x - 1)
|
||||||
}
|
}
|
||||||
else if (x == 10) {
|
else if (x == 10) {
|
||||||
[suppress("NON_TAIL_RECURSIVE_CALL")]
|
[suppress("NON_TAIL_RECURSIVE_CALL")]
|
||||||
return 1 + badTails(x - 1)
|
return 1 + badTails(x - 1)
|
||||||
} else if (x == 50) {
|
} else if (x >= 50) {
|
||||||
return badTails(x - 1)
|
return badTails(x - 1)
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
badTails(1000000)
|
||||||
|
return "OK"
|
||||||
}
|
}
|
||||||
+6
@@ -3,4 +3,10 @@ fun withoutAnnotation(x : Int) : Int {
|
|||||||
return 1 + withoutAnnotation(x - 1)
|
return 1 + withoutAnnotation(x - 1)
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
val r = withoutAnnotation(10)
|
||||||
|
if (r == 10) return "OK"
|
||||||
|
return "Fail $r"
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||||
|
tailRecursive fun Int.foo(x: Int) {
|
||||||
|
if (x == 0) return
|
||||||
|
val xx = x - 1
|
||||||
|
return 1 foo xx
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
1 foo 1000000
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
+6
-1
@@ -5,4 +5,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun run(a: Any) {}
|
fun run(a: Any) {}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
foo()
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
+5
@@ -2,4 +2,9 @@
|
|||||||
fun bar() {
|
fun bar() {
|
||||||
<!NON_TAIL_RECURSIVE_CALL!>foo<!>()
|
<!NON_TAIL_RECURSIVE_CALL!>foo<!>()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
foo()
|
||||||
|
return "OK"
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
tailRecursive fun foo(x: Int) {
|
||||||
|
if (x == 0) return
|
||||||
|
(return foo(x - 1))
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
foo(1000000)
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
tailRecursive fun foo(x: Int) {
|
||||||
|
return if (x > 0) {
|
||||||
|
(foo(x - 1))
|
||||||
|
}
|
||||||
|
else Unit.VALUE
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
foo(1000000)
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
tailRecursive fun foo(x: Int) {
|
||||||
|
if (x == 0) return
|
||||||
|
return (foo(x - 1))
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
foo(1000000)
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<!NO_TAIL_CALLS_FOUND!>tailRecursive fun test(go: Boolean) : Unit<!> {
|
||||||
|
if (!go) return
|
||||||
|
try {
|
||||||
|
<!TAIL_RECURSION_IN_TRY_IS_NOT_SUPPORTED!>test<!>(false)
|
||||||
|
} catch (any : Exception) {
|
||||||
|
<!TAIL_RECURSION_IN_TRY_IS_NOT_SUPPORTED!>test<!>(false)
|
||||||
|
} finally {
|
||||||
|
<!TAIL_RECURSION_IN_TRY_IS_NOT_SUPPORTED!>test<!>(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
test(true)
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
|
||||||
tailRecursive fun Int.foo(x: Int) {
|
|
||||||
return 1.foo(2)
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
|
||||||
tailRecursive fun Int.foo(x: Int) {
|
|
||||||
return 1 foo 2
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
tailRecursive fun foo() {
|
|
||||||
(return foo())
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
tailRecursive fun foo() {
|
|
||||||
return if (true) {
|
|
||||||
(foo())
|
|
||||||
}
|
|
||||||
else Unit.VALUE
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
tailRecursive fun foo() {
|
|
||||||
return (foo())
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
<!NO_TAIL_CALLS_FOUND!>tailRecursive fun test() : Unit<!> {
|
|
||||||
try {
|
|
||||||
<!TAIL_RECURSION_IN_TRY_IS_NOT_SUPPORTED!>test<!>()
|
|
||||||
} catch (any : Exception) {
|
|
||||||
<!TAIL_RECURSION_IN_TRY_IS_NOT_SUPPORTED!>test<!>()
|
|
||||||
} finally {
|
|
||||||
<!TAIL_RECURSION_IN_TRY_IS_NOT_SUPPORTED!>test<!>()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -33,7 +33,7 @@ import org.jetbrains.jet.checkers.AbstractDiagnosticsTestWithEagerResolve;
|
|||||||
@InnerTestClasses({JetDiagnosticsTestGenerated.Tests.class, JetDiagnosticsTestGenerated.Script.class, JetDiagnosticsTestGenerated.TailRecursion.class})
|
@InnerTestClasses({JetDiagnosticsTestGenerated.Tests.class, JetDiagnosticsTestGenerated.Script.class, JetDiagnosticsTestGenerated.TailRecursion.class})
|
||||||
public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEagerResolve {
|
public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEagerResolve {
|
||||||
@TestMetadata("compiler/testData/diagnostics/tests")
|
@TestMetadata("compiler/testData/diagnostics/tests")
|
||||||
@InnerTestClasses({Tests.Annotations.class, Tests.BackingField.class, Tests.CallableReference.class, Tests.Cast.class, Tests.CheckArguments.class, Tests.ClassObjects.class, Tests.ControlFlowAnalysis.class, Tests.ControlStructures.class, Tests.DataClasses.class, Tests.DataFlow.class, Tests.DataFlowInfoTraversal.class, Tests.DeclarationChecks.class, Tests.DelegatedProperty.class, Tests.Deparenthesize.class, Tests.Enum.class, Tests.Evaluate.class, Tests.Extensions.class, Tests.FunctionLiterals.class, Tests.Generics.class, Tests.IncompleteCode.class, Tests.Inference.class, Tests.Infos.class, Tests.Inline.class, Tests.Inner.class, Tests.J_k.class, Tests.Jdk_annotations.class, Tests.Library.class, Tests.NullabilityAndAutoCasts.class, Tests.NullableTypes.class, Tests.Numbers.class, Tests.Objects.class, Tests.OperatorsOverloading.class, Tests.Overload.class, Tests.Override.class, Tests.Recovery.class, Tests.Redeclarations.class, Tests.Regressions.class, Tests.Resolve.class, Tests.Scopes.class, Tests.SenselessComparison.class, Tests.Shadowing.class, Tests.SmartCasts.class, Tests.Substitutions.class, Tests.Subtyping.class, Tests.Suppress.class, Tests.TailCalls.class, Tests.ThisAndSuper.class, Tests.Varargs.class, Tests.When.class})
|
@InnerTestClasses({Tests.Annotations.class, Tests.BackingField.class, Tests.CallableReference.class, Tests.Cast.class, Tests.CheckArguments.class, Tests.ClassObjects.class, Tests.ControlFlowAnalysis.class, Tests.ControlStructures.class, Tests.DataClasses.class, Tests.DataFlow.class, Tests.DataFlowInfoTraversal.class, Tests.DeclarationChecks.class, Tests.DelegatedProperty.class, Tests.Deparenthesize.class, Tests.Enum.class, Tests.Evaluate.class, Tests.Extensions.class, Tests.FunctionLiterals.class, Tests.Generics.class, Tests.IncompleteCode.class, Tests.Inference.class, Tests.Infos.class, Tests.Inline.class, Tests.Inner.class, Tests.J_k.class, Tests.Jdk_annotations.class, Tests.Library.class, Tests.NullabilityAndAutoCasts.class, Tests.NullableTypes.class, Tests.Numbers.class, Tests.Objects.class, Tests.OperatorsOverloading.class, Tests.Overload.class, Tests.Override.class, Tests.Recovery.class, Tests.Redeclarations.class, Tests.Regressions.class, Tests.Resolve.class, Tests.Scopes.class, Tests.SenselessComparison.class, Tests.Shadowing.class, Tests.SmartCasts.class, Tests.Substitutions.class, Tests.Subtyping.class, Tests.Suppress.class, Tests.ThisAndSuper.class, Tests.Varargs.class, Tests.When.class})
|
||||||
public static class Tests extends AbstractDiagnosticsTestWithEagerResolve {
|
public static class Tests extends AbstractDiagnosticsTestWithEagerResolve {
|
||||||
@TestMetadata("Abstract.kt")
|
@TestMetadata("Abstract.kt")
|
||||||
public void testAbstract() throws Exception {
|
public void testAbstract() throws Exception {
|
||||||
@@ -6456,69 +6456,6 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/diagnostics/tests/tailCalls")
|
|
||||||
public static class TailCalls extends AbstractDiagnosticsTestWithEagerResolve {
|
|
||||||
public void testAllFilesPresentInTailCalls() throws Exception {
|
|
||||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/diagnostics/tests/tailCalls"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("extensionTailCall.kt")
|
|
||||||
public void testExtensionTailCall() throws Exception {
|
|
||||||
doTest("compiler/testData/diagnostics/tests/tailCalls/extensionTailCall.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("functionWithNoTails.kt")
|
|
||||||
public void testFunctionWithNoTails() throws Exception {
|
|
||||||
doTest("compiler/testData/diagnostics/tests/tailCalls/functionWithNoTails.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("functionWithNonTailRecursions.kt")
|
|
||||||
public void testFunctionWithNonTailRecursions() throws Exception {
|
|
||||||
doTest("compiler/testData/diagnostics/tests/tailCalls/functionWithNonTailRecursions.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("functionWithoutAnnotation.kt")
|
|
||||||
public void testFunctionWithoutAnnotation() throws Exception {
|
|
||||||
doTest("compiler/testData/diagnostics/tests/tailCalls/functionWithoutAnnotation.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("infixRecursiveCall.kt")
|
|
||||||
public void testInfixRecursiveCall() throws Exception {
|
|
||||||
doTest("compiler/testData/diagnostics/tests/tailCalls/infixRecursiveCall.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("recursiveCallInLambda.kt")
|
|
||||||
public void testRecursiveCallInLambda() throws Exception {
|
|
||||||
doTest("compiler/testData/diagnostics/tests/tailCalls/recursiveCallInLambda.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("recursiveCallInLocalFunction.kt")
|
|
||||||
public void testRecursiveCallInLocalFunction() throws Exception {
|
|
||||||
doTest("compiler/testData/diagnostics/tests/tailCalls/recursiveCallInLocalFunction.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("returnInParentheses.kt")
|
|
||||||
public void testReturnInParentheses() throws Exception {
|
|
||||||
doTest("compiler/testData/diagnostics/tests/tailCalls/returnInParentheses.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("tailCallInBlockInParentheses.kt")
|
|
||||||
public void testTailCallInBlockInParentheses() throws Exception {
|
|
||||||
doTest("compiler/testData/diagnostics/tests/tailCalls/tailCallInBlockInParentheses.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("tailCallInParentheses.kt")
|
|
||||||
public void testTailCallInParentheses() throws Exception {
|
|
||||||
doTest("compiler/testData/diagnostics/tests/tailCalls/tailCallInParentheses.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("tailRecursionInFinally.kt")
|
|
||||||
public void testTailRecursionInFinally() throws Exception {
|
|
||||||
doTest("compiler/testData/diagnostics/tests/tailCalls/tailRecursionInFinally.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/diagnostics/tests/thisAndSuper")
|
@TestMetadata("compiler/testData/diagnostics/tests/thisAndSuper")
|
||||||
public static class ThisAndSuper extends AbstractDiagnosticsTestWithEagerResolve {
|
public static class ThisAndSuper extends AbstractDiagnosticsTestWithEagerResolve {
|
||||||
public void testAllFilesPresentInThisAndSuper() throws Exception {
|
public void testAllFilesPresentInThisAndSuper() throws Exception {
|
||||||
@@ -6751,7 +6688,6 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage
|
|||||||
suite.addTestSuite(Substitutions.class);
|
suite.addTestSuite(Substitutions.class);
|
||||||
suite.addTestSuite(Subtyping.class);
|
suite.addTestSuite(Subtyping.class);
|
||||||
suite.addTest(Suppress.innerSuite());
|
suite.addTest(Suppress.innerSuite());
|
||||||
suite.addTestSuite(TailCalls.class);
|
|
||||||
suite.addTestSuite(ThisAndSuper.class);
|
suite.addTestSuite(ThisAndSuper.class);
|
||||||
suite.addTestSuite(Varargs.class);
|
suite.addTestSuite(Varargs.class);
|
||||||
suite.addTestSuite(When.class);
|
suite.addTestSuite(When.class);
|
||||||
@@ -6798,11 +6734,36 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage
|
|||||||
doTest("compiler/testData/codegen/box/functions/tailRecursion/defaultArgs.kt");
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/defaultArgs.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("extensionTailCall.kt")
|
||||||
|
public void testExtensionTailCall() throws Exception {
|
||||||
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/extensionTailCall.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("functionWithNoTails.kt")
|
||||||
|
public void testFunctionWithNoTails() throws Exception {
|
||||||
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/functionWithNoTails.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("functionWithNonTailRecursions.kt")
|
||||||
|
public void testFunctionWithNonTailRecursions() throws Exception {
|
||||||
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/functionWithNonTailRecursions.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("functionWithoutAnnotation.kt")
|
||||||
|
public void testFunctionWithoutAnnotation() throws Exception {
|
||||||
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/functionWithoutAnnotation.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("infixCall.kt")
|
@TestMetadata("infixCall.kt")
|
||||||
public void testInfixCall() throws Exception {
|
public void testInfixCall() throws Exception {
|
||||||
doTest("compiler/testData/codegen/box/functions/tailRecursion/infixCall.kt");
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/infixCall.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("infixRecursiveCall.kt")
|
||||||
|
public void testInfixRecursiveCall() throws Exception {
|
||||||
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/infixRecursiveCall.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("insideElvis.kt")
|
@TestMetadata("insideElvis.kt")
|
||||||
public void testInsideElvis() throws Exception {
|
public void testInsideElvis() throws Exception {
|
||||||
doTest("compiler/testData/codegen/box/functions/tailRecursion/insideElvis.kt");
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/insideElvis.kt");
|
||||||
@@ -6838,6 +6799,16 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage
|
|||||||
doTest("compiler/testData/codegen/box/functions/tailRecursion/realStringRepeat.kt");
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/realStringRepeat.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveCallInLambda.kt")
|
||||||
|
public void testRecursiveCallInLambda() throws Exception {
|
||||||
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/recursiveCallInLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveCallInLocalFunction.kt")
|
||||||
|
public void testRecursiveCallInLocalFunction() throws Exception {
|
||||||
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/recursiveCallInLocalFunction.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("recursiveInnerFunction.kt")
|
@TestMetadata("recursiveInnerFunction.kt")
|
||||||
public void testRecursiveInnerFunction() throws Exception {
|
public void testRecursiveInnerFunction() throws Exception {
|
||||||
doTest("compiler/testData/codegen/box/functions/tailRecursion/recursiveInnerFunction.kt");
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/recursiveInnerFunction.kt");
|
||||||
@@ -6863,6 +6834,11 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage
|
|||||||
doTest("compiler/testData/codegen/box/functions/tailRecursion/returnInIfInFinally.kt");
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/returnInIfInFinally.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("returnInParentheses.kt")
|
||||||
|
public void testReturnInParentheses() throws Exception {
|
||||||
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/returnInParentheses.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("returnInTry.kt")
|
@TestMetadata("returnInTry.kt")
|
||||||
public void testReturnInTry() throws Exception {
|
public void testReturnInTry() throws Exception {
|
||||||
doTest("compiler/testData/codegen/box/functions/tailRecursion/returnInTry.kt");
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/returnInTry.kt");
|
||||||
@@ -6888,6 +6864,21 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage
|
|||||||
doTest("compiler/testData/codegen/box/functions/tailRecursion/sum.kt");
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/sum.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("tailCallInBlockInParentheses.kt")
|
||||||
|
public void testTailCallInBlockInParentheses() throws Exception {
|
||||||
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/tailCallInBlockInParentheses.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("tailCallInParentheses.kt")
|
||||||
|
public void testTailCallInParentheses() throws Exception {
|
||||||
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/tailCallInParentheses.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("tailRecursionInFinally.kt")
|
||||||
|
public void testTailRecursionInFinally() throws Exception {
|
||||||
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/tailRecursionInFinally.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("thisReferences.kt")
|
@TestMetadata("thisReferences.kt")
|
||||||
public void testThisReferences() throws Exception {
|
public void testThisReferences() throws Exception {
|
||||||
doTest("compiler/testData/codegen/box/functions/tailRecursion/thisReferences.kt");
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/thisReferences.kt");
|
||||||
|
|||||||
@@ -2634,11 +2634,36 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
doTest("compiler/testData/codegen/box/functions/tailRecursion/defaultArgs.kt");
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/defaultArgs.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("extensionTailCall.kt")
|
||||||
|
public void testExtensionTailCall() throws Exception {
|
||||||
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/extensionTailCall.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("functionWithNoTails.kt")
|
||||||
|
public void testFunctionWithNoTails() throws Exception {
|
||||||
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/functionWithNoTails.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("functionWithNonTailRecursions.kt")
|
||||||
|
public void testFunctionWithNonTailRecursions() throws Exception {
|
||||||
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/functionWithNonTailRecursions.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("functionWithoutAnnotation.kt")
|
||||||
|
public void testFunctionWithoutAnnotation() throws Exception {
|
||||||
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/functionWithoutAnnotation.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("infixCall.kt")
|
@TestMetadata("infixCall.kt")
|
||||||
public void testInfixCall() throws Exception {
|
public void testInfixCall() throws Exception {
|
||||||
doTest("compiler/testData/codegen/box/functions/tailRecursion/infixCall.kt");
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/infixCall.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("infixRecursiveCall.kt")
|
||||||
|
public void testInfixRecursiveCall() throws Exception {
|
||||||
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/infixRecursiveCall.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("insideElvis.kt")
|
@TestMetadata("insideElvis.kt")
|
||||||
public void testInsideElvis() throws Exception {
|
public void testInsideElvis() throws Exception {
|
||||||
doTest("compiler/testData/codegen/box/functions/tailRecursion/insideElvis.kt");
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/insideElvis.kt");
|
||||||
@@ -2674,6 +2699,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
doTest("compiler/testData/codegen/box/functions/tailRecursion/realStringRepeat.kt");
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/realStringRepeat.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveCallInLambda.kt")
|
||||||
|
public void testRecursiveCallInLambda() throws Exception {
|
||||||
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/recursiveCallInLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("recursiveCallInLocalFunction.kt")
|
||||||
|
public void testRecursiveCallInLocalFunction() throws Exception {
|
||||||
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/recursiveCallInLocalFunction.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("recursiveInnerFunction.kt")
|
@TestMetadata("recursiveInnerFunction.kt")
|
||||||
public void testRecursiveInnerFunction() throws Exception {
|
public void testRecursiveInnerFunction() throws Exception {
|
||||||
doTest("compiler/testData/codegen/box/functions/tailRecursion/recursiveInnerFunction.kt");
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/recursiveInnerFunction.kt");
|
||||||
@@ -2699,6 +2734,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
doTest("compiler/testData/codegen/box/functions/tailRecursion/returnInIfInFinally.kt");
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/returnInIfInFinally.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("returnInParentheses.kt")
|
||||||
|
public void testReturnInParentheses() throws Exception {
|
||||||
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/returnInParentheses.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("returnInTry.kt")
|
@TestMetadata("returnInTry.kt")
|
||||||
public void testReturnInTry() throws Exception {
|
public void testReturnInTry() throws Exception {
|
||||||
doTest("compiler/testData/codegen/box/functions/tailRecursion/returnInTry.kt");
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/returnInTry.kt");
|
||||||
@@ -2724,6 +2764,21 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
doTest("compiler/testData/codegen/box/functions/tailRecursion/sum.kt");
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/sum.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("tailCallInBlockInParentheses.kt")
|
||||||
|
public void testTailCallInBlockInParentheses() throws Exception {
|
||||||
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/tailCallInBlockInParentheses.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("tailCallInParentheses.kt")
|
||||||
|
public void testTailCallInParentheses() throws Exception {
|
||||||
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/tailCallInParentheses.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("tailRecursionInFinally.kt")
|
||||||
|
public void testTailRecursionInFinally() throws Exception {
|
||||||
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/tailRecursionInFinally.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("thisReferences.kt")
|
@TestMetadata("thisReferences.kt")
|
||||||
public void testThisReferences() throws Exception {
|
public void testThisReferences() throws Exception {
|
||||||
doTest("compiler/testData/codegen/box/functions/tailRecursion/thisReferences.kt");
|
doTest("compiler/testData/codegen/box/functions/tailRecursion/thisReferences.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user