From 081e1de5af0f68685a738a93e07d6624cae2122f Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Wed, 8 Nov 2023 11:30:59 +0100 Subject: [PATCH] FE: fix a typo in irrelevantMapGetAbstract.kt diagnostic test Related to KT-45053 --- .../irrelevantMapGetAbstract.fir.kt | 19 ------------------- .../irrelevantMapGetAbstract.kt | 3 ++- .../irrelevantMapGetAbstract.txt | 5 +++-- 3 files changed, 5 insertions(+), 22 deletions(-) delete mode 100644 compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantMapGetAbstract.fir.kt diff --git a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantMapGetAbstract.fir.kt b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantMapGetAbstract.fir.kt deleted file mode 100644 index 055a7d36daf..00000000000 --- a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantMapGetAbstract.fir.kt +++ /dev/null @@ -1,19 +0,0 @@ -// FILE: Dict.java - -public abstract class Dict { - abstract public V get(Object key); -} - -// FILE: MHashtable.java - -abstract public class MHashtable extends Dict implements java.util.Map { - public V get(Object key) { return null; } -} - -// FILE: main.kt - -abstract class C1 : MHashtable() - -abstract class C2 : MHashtable() { - override fun get(key: String) = 1 -} diff --git a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantMapGetAbstract.kt b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantMapGetAbstract.kt index 409e6ed8c49..900aad77290 100644 --- a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantMapGetAbstract.kt +++ b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantMapGetAbstract.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FILE: Dict.java public abstract class Dict { @@ -7,7 +8,7 @@ public abstract class Dict { // FILE: MHashtable.java abstract public class MHashtable extends Dict implements java.util.Map { - public V get(Object key) { return null; } + public Y get(Object key) { return null; } } // FILE: main.kt diff --git a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantMapGetAbstract.txt b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantMapGetAbstract.txt index dc43c70ef06..beeeeb9f7f1 100644 --- a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantMapGetAbstract.txt +++ b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantMapGetAbstract.txt @@ -10,7 +10,7 @@ public abstract class C1 : MHashtable { public abstract override /*1*/ /*fake_override*/ fun containsKey(/*0*/ key: kotlin.String!): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun containsValue(/*0*/ value: kotlin.Int!): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public abstract override /*1*/ /*fake_override*/ fun get(/*0*/ key: kotlin.String!): kotlin.Int? + public open override /*1*/ /*fake_override*/ fun get(/*0*/ key: kotlin.String!): kotlin.Int? public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public abstract override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun put(/*0*/ key: kotlin.String!, /*1*/ value: kotlin.Int!): kotlin.Int? @@ -56,7 +56,7 @@ public abstract class MHashtable : public abstract override /*1*/ /*fake_override*/ fun containsKey(/*0*/ key: X!): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun containsValue(/*0*/ value: Y!): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public abstract override /*2*/ /*fake_override*/ fun get(/*0*/ key: X!): Y? + public open override /*2*/ fun get(/*0*/ key: X!): Y? public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int public abstract override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun put(/*0*/ key: X!, /*1*/ value: Y!): Y? @@ -64,3 +64,4 @@ public abstract class MHashtable : public abstract override /*1*/ /*fake_override*/ fun remove(/*0*/ key: X!): Y? public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String } +