KT-5697 Duplicate Unit type
#KT-5697 Fixed
This commit is contained in:
@@ -115,7 +115,7 @@ public class JvmCodegenUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static boolean rawTypeMatches(JetType type, ClassifierDescriptor classifier) {
|
private static boolean rawTypeMatches(JetType type, ClassifierDescriptor classifier) {
|
||||||
return type.getConstructor().getDeclarationDescriptor().getOriginal() == classifier.getOriginal();
|
return type.getConstructor().equals(classifier.getTypeConstructor());
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isCallInsideSameClassAsDeclared(@NotNull CallableMemberDescriptor descriptor, @NotNull CodegenContext context) {
|
private static boolean isCallInsideSameClassAsDeclared(@NotNull CallableMemberDescriptor descriptor, @NotNull CodegenContext context) {
|
||||||
|
|||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
// FILE: f1.kt
|
||||||
|
|
||||||
|
package kotlin
|
||||||
|
|
||||||
|
class Unit
|
||||||
|
|
||||||
|
// FILE: f2.kt
|
||||||
|
|
||||||
|
class C: MutableIterator<Int> {
|
||||||
|
override fun remove(): Unit {
|
||||||
|
throw UnsupportedOperationException()
|
||||||
|
}
|
||||||
|
override fun next(): Int {
|
||||||
|
throw UnsupportedOperationException()
|
||||||
|
}
|
||||||
|
override fun hasNext(): Boolean {
|
||||||
|
throw UnsupportedOperationException()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -5372,6 +5372,11 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
|
|||||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule/duplicateClass"), Pattern.compile("^(.+)\\.kt$"), true);
|
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule/duplicateClass"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("collectionMethodStub.kt")
|
||||||
|
public void testCollectionMethodStub() throws Exception {
|
||||||
|
doTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/collectionMethodStub.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("differentGenericArguments.kt")
|
@TestMetadata("differentGenericArguments.kt")
|
||||||
public void testDifferentGenericArguments() throws Exception {
|
public void testDifferentGenericArguments() throws Exception {
|
||||||
doTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/differentGenericArguments.kt");
|
doTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/differentGenericArguments.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user