diff --git a/compiler/testData/codegen/regressions/kt1939.kt b/compiler/testData/codegen/regressions/kt1939.kt new file mode 100644 index 00000000000..81cc023ddaa --- /dev/null +++ b/compiler/testData/codegen/regressions/kt1939.kt @@ -0,0 +1,12 @@ +abstract class Foo { + fun hello(id: T) = "Hi $id" +} + +trait Tr { + fun hello(s : String) +} + +class Bar: Foo(), Tr { +} + +fun box(): String = if (Bar().hello("Reg") == "Hi Reg") "OK" else "Fail" diff --git a/compiler/tests/org/jetbrains/jet/codegen/BridgeMethodGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/BridgeMethodGenTest.java index a337f0c97d3..5cd4c0dceef 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/BridgeMethodGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/BridgeMethodGenTest.java @@ -134,4 +134,9 @@ public class BridgeMethodGenTest extends CodegenTestCase { createEnvironmentWithFullJdk(); blackBoxFile("regressions/kt2498.kt"); } + + public void testKt1939() { + createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY); + blackBoxFile("regressions/kt1939.kt"); + } }