Workaround for KT-34656: temporary disable assertion
This commit is contained in:
@@ -46,9 +46,10 @@ class TypeRemapper private constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun registerTypeParameter(name: String) {
|
fun registerTypeParameter(name: String) {
|
||||||
assert(typeParametersMapping[name] == null) {
|
//TODO: enable after KT-34656 proper fix
|
||||||
"Type parameter already registered $name"
|
// assert(typeParametersMapping[name] == null) {
|
||||||
}
|
// "Type parameter already registered $name"
|
||||||
|
// }
|
||||||
typeParametersMapping[name] = TypeParameter(name, name, false, null)
|
typeParametersMapping[name] = TypeParameter(name, name, false, null)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
// FILE: 1.kt
|
||||||
|
package test
|
||||||
|
|
||||||
|
interface Foo {
|
||||||
|
fun call(): String
|
||||||
|
}
|
||||||
|
|
||||||
|
inline fun f(crossinline g: () -> String) = object: Foo {
|
||||||
|
fun <T> foo() = g()
|
||||||
|
fun <T> bar() = "K"
|
||||||
|
override fun call(): String = foo<String>() + bar<String>()
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: 2.kt
|
||||||
|
import test.*
|
||||||
|
|
||||||
|
val x = f { "O" }
|
||||||
|
|
||||||
|
fun box() : String {
|
||||||
|
return x.call()
|
||||||
|
}
|
||||||
+5
@@ -211,6 +211,11 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
|
|||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19723.kt");
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19723.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("kt34656.kt")
|
||||||
|
public void testKt34656() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt34656.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("kt6552.kt")
|
@TestMetadata("kt6552.kt")
|
||||||
public void testKt6552() throws Exception {
|
public void testKt6552() throws Exception {
|
||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt");
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt");
|
||||||
|
|||||||
Generated
+5
@@ -211,6 +211,11 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
|
|||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19723.kt");
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19723.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("kt34656.kt")
|
||||||
|
public void testKt34656() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt34656.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("kt6552.kt")
|
@TestMetadata("kt6552.kt")
|
||||||
public void testKt6552() throws Exception {
|
public void testKt6552() throws Exception {
|
||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt");
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt");
|
||||||
|
|||||||
+5
@@ -211,6 +211,11 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
|
|||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19723.kt");
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19723.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("kt34656.kt")
|
||||||
|
public void testKt34656() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt34656.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("kt6552.kt")
|
@TestMetadata("kt6552.kt")
|
||||||
public void testKt6552() throws Exception {
|
public void testKt6552() throws Exception {
|
||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt");
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt");
|
||||||
|
|||||||
Generated
+5
@@ -211,6 +211,11 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
|
|||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19723.kt");
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19723.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("kt34656.kt")
|
||||||
|
public void testKt34656() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt34656.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("kt6552.kt")
|
@TestMetadata("kt6552.kt")
|
||||||
public void testKt6552() throws Exception {
|
public void testKt6552() throws Exception {
|
||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt");
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user