Temporary disable assertion in bridges generation

^KT-34431 Fixed
^KT-34507 Open
This commit is contained in:
Denis Zharkov
2019-10-21 14:29:01 +03:00
parent 28b6913a25
commit d902a5f304
7 changed files with 44 additions and 3 deletions
@@ -161,9 +161,10 @@ private fun <Signature> findSuperImplementationForStubDelegation(
// Implementation in super-class already has proper signature
if (signatureByDescriptor(function) == signatureByDescriptor(implementation.descriptor)) return null
assert(function.modality == Modality.OPEN) {
"Should generate stubs only for non-abstract built-ins, but ${function.name} is ${function.modality}"
}
// TODO: Enable the assertion once KT-34507 is fixed
// assert(function.modality == Modality.OPEN) {
// "Should generate stubs only for non-abstract built-ins, but ${function.name} is ${function.modality}"
// }
return implementation.descriptor
}
@@ -0,0 +1,15 @@
class Queue<T>(override val size: Int) : Collection<T> {
override fun contains(element: T): Boolean = TODO()
override fun containsAll(elements: Collection<T>): Boolean = TODO()
override fun isEmpty(): Boolean = TODO()
override fun iterator(): Iterator<T> = TODO()
fun remove(v: T): Any = v as Any
}
fun box(): String {
return Queue<String>(1).remove("OK") as String
}
@@ -4458,6 +4458,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/collections/removeAtInt.kt");
}
@TestMetadata("removeClash.kt")
public void testRemoveClash() throws Exception {
runTest("compiler/testData/codegen/box/collections/removeClash.kt");
}
@TestMetadata("strList.kt")
public void testStrList() throws Exception {
runTest("compiler/testData/codegen/box/collections/strList.kt");
@@ -4458,6 +4458,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/collections/removeAtInt.kt");
}
@TestMetadata("removeClash.kt")
public void testRemoveClash() throws Exception {
runTest("compiler/testData/codegen/box/collections/removeClash.kt");
}
@TestMetadata("strList.kt")
public void testStrList() throws Exception {
runTest("compiler/testData/codegen/box/collections/strList.kt");
@@ -4428,6 +4428,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/collections/removeAtInt.kt");
}
@TestMetadata("removeClash.kt")
public void testRemoveClash() throws Exception {
runTest("compiler/testData/codegen/box/collections/removeClash.kt");
}
@TestMetadata("strList.kt")
public void testStrList() throws Exception {
runTest("compiler/testData/codegen/box/collections/strList.kt");
@@ -3677,6 +3677,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
public void testInSetWithSmartCast() throws Exception {
runTest("compiler/testData/codegen/box/collections/inSetWithSmartCast.kt");
}
@TestMetadata("removeClash.kt")
public void testRemoveClash() throws Exception {
runTest("compiler/testData/codegen/box/collections/removeClash.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/compatibility")
@@ -3687,6 +3687,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
public void testInSetWithSmartCast() throws Exception {
runTest("compiler/testData/codegen/box/collections/inSetWithSmartCast.kt");
}
@TestMetadata("removeClash.kt")
public void testRemoveClash() throws Exception {
runTest("compiler/testData/codegen/box/collections/removeClash.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/compatibility")