From c3725054eb698069f8047a6fcac264fd164f0005 Mon Sep 17 00:00:00 2001 From: Alex Tkachman Date: Mon, 2 Jan 2012 09:36:13 +0200 Subject: [PATCH] test for obsolete KT-889 --- compiler/testData/codegen/regressions/kt889.jet | 9 +++++++++ .../tests/org/jetbrains/jet/codegen/StringsTest.java | 4 ++++ 2 files changed, 13 insertions(+) create mode 100644 compiler/testData/codegen/regressions/kt889.jet diff --git a/compiler/testData/codegen/regressions/kt889.jet b/compiler/testData/codegen/regressions/kt889.jet new file mode 100644 index 00000000000..20829fdbc57 --- /dev/null +++ b/compiler/testData/codegen/regressions/kt889.jet @@ -0,0 +1,9 @@ +fun Int.plus(s: String) : String { + System.out?.println("Int.plus(s: String) called") + return s +} + +fun box() : String { + val s = "${1 + "a"}" + return if(s == "a") "OK" else "fail" +} diff --git a/compiler/tests/org/jetbrains/jet/codegen/StringsTest.java b/compiler/tests/org/jetbrains/jet/codegen/StringsTest.java index 5998879f623..cf6a552ba06 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/StringsTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/StringsTest.java @@ -64,4 +64,8 @@ public class StringsTest extends CodegenTestCase { public void testKt894() throws Exception { blackBoxFile("regressions/kt894.jet"); } + + public void testKt889() throws Exception { + blackBoxFile("regressions/kt889.jet"); + } }