From e2f3a589e727dd8352344518a45348e64a080215 Mon Sep 17 00:00:00 2001 From: Mikhael Bogdanov Date: Tue, 1 Apr 2014 11:04:24 +0400 Subject: [PATCH] KT-3308 Support local generic functions in codegen #KT-3308 Can'tReproduce --- .../testData/codegen/box/functions/localFunctions/kt3308.kt | 5 +++++ .../jet/codegen/generated/BlackBoxCodegenTestGenerated.java | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 compiler/testData/codegen/box/functions/localFunctions/kt3308.kt diff --git a/compiler/testData/codegen/box/functions/localFunctions/kt3308.kt b/compiler/testData/codegen/box/functions/localFunctions/kt3308.kt new file mode 100644 index 00000000000..3c8d56f0486 --- /dev/null +++ b/compiler/testData/codegen/box/functions/localFunctions/kt3308.kt @@ -0,0 +1,5 @@ +fun box(): String { + fun foo(t: T) = t + + return foo("OK") +} \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/jet/codegen/generated/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/jet/codegen/generated/BlackBoxCodegenTestGenerated.java index ad02475af32..a198a6914a9 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/generated/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/codegen/generated/BlackBoxCodegenTestGenerated.java @@ -2951,6 +2951,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { doTest("compiler/testData/codegen/box/functions/localFunctions/kt2895.kt"); } + @TestMetadata("kt3308.kt") + public void testKt3308() throws Exception { + doTest("compiler/testData/codegen/box/functions/localFunctions/kt3308.kt"); + } + @TestMetadata("kt3978.kt") public void testKt3978() throws Exception { doTest("compiler/testData/codegen/box/functions/localFunctions/kt3978.kt");