From 8e73a902e479ae285a70b9e633544cb5526bef08 Mon Sep 17 00:00:00 2001 From: Mikhail Zarechenskiy Date: Fri, 9 Dec 2016 16:42:27 +0300 Subject: [PATCH] Additional tests on mod/rem migration --- .../DeprecatedModAssignOperatorConventions.kt | 2 +- ...DeprecatedModAssignOperatorConventions.txt | 0 .../DeprecatedModOperatorConventions.kt | 6 +- .../DeprecatedModOperatorConventions.txt | 2 +- .../doNotResolveToInapplicableRem.kt | 12 +++ .../doNotResolveToInapplicableRem.txt | 19 +++++ .../tests/operatorRem/noOperatorRemFeature.kt | 16 +++- .../operatorRem/noOperatorRemFeature.txt | 19 ++++- .../preferRemFromCompanionObjectOverRem.kt | 15 ++++ .../preferRemFromCompanionObjectOverRem.txt | 19 +++++ .../preferRemOverModInLocalFunctions.kt | 29 +++++++ .../preferRemOverModInLocalFunctions.txt | 28 +++++++ .../preferRemWithImplicitReceivers.kt | 19 +++++ .../preferRemWithImplicitReceivers.txt | 20 +++++ .../operatorRem/resolveModIfRemIsHidden.kt | 14 ++++ .../operatorRem/resolveModIfRemIsHidden.txt | 13 ++++ .../checkers/DiagnosticsTestGenerated.java | 78 ++++++++++++++++--- 17 files changed, 289 insertions(+), 22 deletions(-) rename compiler/testData/diagnostics/tests/{ => operatorRem}/DeprecatedModAssignOperatorConventions.kt (93%) rename compiler/testData/diagnostics/tests/{ => operatorRem}/DeprecatedModAssignOperatorConventions.txt (100%) rename compiler/testData/diagnostics/tests/{ => operatorRem}/DeprecatedModOperatorConventions.kt (79%) rename compiler/testData/diagnostics/tests/{ => operatorRem}/DeprecatedModOperatorConventions.txt (96%) create mode 100644 compiler/testData/diagnostics/tests/operatorRem/doNotResolveToInapplicableRem.kt create mode 100644 compiler/testData/diagnostics/tests/operatorRem/doNotResolveToInapplicableRem.txt create mode 100644 compiler/testData/diagnostics/tests/operatorRem/preferRemFromCompanionObjectOverRem.kt create mode 100644 compiler/testData/diagnostics/tests/operatorRem/preferRemFromCompanionObjectOverRem.txt create mode 100644 compiler/testData/diagnostics/tests/operatorRem/preferRemOverModInLocalFunctions.kt create mode 100644 compiler/testData/diagnostics/tests/operatorRem/preferRemOverModInLocalFunctions.txt create mode 100644 compiler/testData/diagnostics/tests/operatorRem/preferRemWithImplicitReceivers.kt create mode 100644 compiler/testData/diagnostics/tests/operatorRem/preferRemWithImplicitReceivers.txt create mode 100644 compiler/testData/diagnostics/tests/operatorRem/resolveModIfRemIsHidden.kt create mode 100644 compiler/testData/diagnostics/tests/operatorRem/resolveModIfRemIsHidden.txt diff --git a/compiler/testData/diagnostics/tests/DeprecatedModAssignOperatorConventions.kt b/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModAssignOperatorConventions.kt similarity index 93% rename from compiler/testData/diagnostics/tests/DeprecatedModAssignOperatorConventions.kt rename to compiler/testData/diagnostics/tests/operatorRem/DeprecatedModAssignOperatorConventions.kt index 4fbeea957c5..5f3181b7cb5 100644 --- a/compiler/testData/diagnostics/tests/DeprecatedModAssignOperatorConventions.kt +++ b/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModAssignOperatorConventions.kt @@ -37,5 +37,5 @@ fun test() { sample %= 1 var modAndRemAssign = ModAndRemAssign() - modAndRemAssign %= 1 + modAndRemAssign %= 1 } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/DeprecatedModAssignOperatorConventions.txt b/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModAssignOperatorConventions.txt similarity index 100% rename from compiler/testData/diagnostics/tests/DeprecatedModAssignOperatorConventions.txt rename to compiler/testData/diagnostics/tests/operatorRem/DeprecatedModAssignOperatorConventions.txt diff --git a/compiler/testData/diagnostics/tests/DeprecatedModOperatorConventions.kt b/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModOperatorConventions.kt similarity index 79% rename from compiler/testData/diagnostics/tests/DeprecatedModOperatorConventions.kt rename to compiler/testData/diagnostics/tests/operatorRem/DeprecatedModOperatorConventions.kt index f3b3db93035..7da4051e628 100644 --- a/compiler/testData/diagnostics/tests/DeprecatedModOperatorConventions.kt +++ b/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModOperatorConventions.kt @@ -19,8 +19,8 @@ class Sample operator fun Sample.rem(x: Int) {} class IntAndUnit { - operator fun mod(x: Int): Int = 0 - operator fun rem(x: Int) {} + operator fun mod(x: Int) = 0 + operator fun rem(x: Int): Int = 0 } fun test() { @@ -29,7 +29,7 @@ fun test() { OnlyNew() % 1 Sample() % 1 - takeInt(IntAndUnit() % 1) + takeInt(IntAndUnit() % 1) } fun takeInt(x: Int) {} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/DeprecatedModOperatorConventions.txt b/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModOperatorConventions.txt similarity index 96% rename from compiler/testData/diagnostics/tests/DeprecatedModOperatorConventions.txt rename to compiler/testData/diagnostics/tests/operatorRem/DeprecatedModOperatorConventions.txt index 0c652b848e1..016fec865da 100644 --- a/compiler/testData/diagnostics/tests/DeprecatedModOperatorConventions.txt +++ b/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModOperatorConventions.txt @@ -10,7 +10,7 @@ public final class IntAndUnit { public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public final operator fun mod(/*0*/ x: kotlin.Int): kotlin.Int - public final operator fun rem(/*0*/ x: kotlin.Int): kotlin.Unit + public final operator fun rem(/*0*/ x: kotlin.Int): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } diff --git a/compiler/testData/diagnostics/tests/operatorRem/doNotResolveToInapplicableRem.kt b/compiler/testData/diagnostics/tests/operatorRem/doNotResolveToInapplicableRem.kt new file mode 100644 index 00000000000..2699a872e43 --- /dev/null +++ b/compiler/testData/diagnostics/tests/operatorRem/doNotResolveToInapplicableRem.kt @@ -0,0 +1,12 @@ +// !DIAGNOSTICS: -UNUSED_PARAMETER + +object OldMod { + operator fun mod(x: Int) {} +} + +object RemExtension +operator fun RemExtension.rem(x: Int) {} + +fun foo() { + OldMod % 123 +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/operatorRem/doNotResolveToInapplicableRem.txt b/compiler/testData/diagnostics/tests/operatorRem/doNotResolveToInapplicableRem.txt new file mode 100644 index 00000000000..aa62a81f925 --- /dev/null +++ b/compiler/testData/diagnostics/tests/operatorRem/doNotResolveToInapplicableRem.txt @@ -0,0 +1,19 @@ +package + +public fun foo(): kotlin.Unit +public operator fun RemExtension.rem(/*0*/ x: kotlin.Int): kotlin.Unit + +public object OldMod { + private constructor OldMod() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public final operator fun mod(/*0*/ x: kotlin.Int): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public object RemExtension { + private constructor RemExtension() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.kt b/compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.kt index 08f67a61466..9c9582086ab 100644 --- a/compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.kt +++ b/compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.kt @@ -9,8 +9,16 @@ class Bar { operator fun remAssign(x: Int) {} } -fun baz() { - val f = Foo() % 1 - val b = Bar() - b %= 1 +class Baz { + companion object { + operator fun rem(x: Int) {} + operator fun Int.rem(x: Int) {} + } +} + +operator fun Baz.rem(x: Int) {} + +fun local() { + operator fun Int.rem(x: Int) {} + operator fun String.remAssign(x: Int) {} } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.txt b/compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.txt index c56db280a84..8829fcd6cc8 100644 --- a/compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.txt +++ b/compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.txt @@ -1,6 +1,7 @@ package -public fun baz(): kotlin.Unit +public fun local(): kotlin.Unit +public operator fun Baz.rem(/*0*/ x: kotlin.Int): kotlin.Unit public final class Bar { public constructor Bar() @@ -10,6 +11,22 @@ public final class Bar { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } +public final class Baz { + public constructor Baz() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + + public companion object Companion { + private constructor Companion() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public final operator fun rem(/*0*/ x: kotlin.Int): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + public final operator fun kotlin.Int.rem(/*0*/ x: kotlin.Int): kotlin.Unit + } +} + public final class Foo { public constructor Foo() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/operatorRem/preferRemFromCompanionObjectOverRem.kt b/compiler/testData/diagnostics/tests/operatorRem/preferRemFromCompanionObjectOverRem.kt new file mode 100644 index 00000000000..d632737f7b7 --- /dev/null +++ b/compiler/testData/diagnostics/tests/operatorRem/preferRemFromCompanionObjectOverRem.kt @@ -0,0 +1,15 @@ +// !DIAGNOSTICS: -UNUSED_PARAMETER + +class A { + companion object { + operator fun A.rem(x: Int) = 0 + } + + fun test() { + operator fun A.mod(x: Int) = "" + + takeInt(A() % 123) + } +} + +fun takeInt(x: Int) {} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/operatorRem/preferRemFromCompanionObjectOverRem.txt b/compiler/testData/diagnostics/tests/operatorRem/preferRemFromCompanionObjectOverRem.txt new file mode 100644 index 00000000000..1103567873c --- /dev/null +++ b/compiler/testData/diagnostics/tests/operatorRem/preferRemFromCompanionObjectOverRem.txt @@ -0,0 +1,19 @@ +package + +public fun takeInt(/*0*/ x: kotlin.Int): kotlin.Unit + +public final class A { + public constructor A() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public final fun test(): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + + public companion object Companion { + private constructor Companion() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + public final operator fun A.rem(/*0*/ x: kotlin.Int): kotlin.Int + } +} diff --git a/compiler/testData/diagnostics/tests/operatorRem/preferRemOverModInLocalFunctions.kt b/compiler/testData/diagnostics/tests/operatorRem/preferRemOverModInLocalFunctions.kt new file mode 100644 index 00000000000..979621c5153 --- /dev/null +++ b/compiler/testData/diagnostics/tests/operatorRem/preferRemOverModInLocalFunctions.kt @@ -0,0 +1,29 @@ +// !DIAGNOSTICS: -UNUSED_PARAMETER + +object B + +class A { + operator fun B.rem(x: Int) = 0 +} + +fun test1() { + operator fun B.mod(x: Int) = "" + + with(A()) { + takeInt(B % 10) + } +} + +class C { + operator fun B.mod(x: Int) = "" +} + +fun test2() { + operator fun B.rem(x: Int) = 0 + + with(C()) { + takeInt(B % 10) + } +} + +fun takeInt(x: Int) {} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/operatorRem/preferRemOverModInLocalFunctions.txt b/compiler/testData/diagnostics/tests/operatorRem/preferRemOverModInLocalFunctions.txt new file mode 100644 index 00000000000..13427402d75 --- /dev/null +++ b/compiler/testData/diagnostics/tests/operatorRem/preferRemOverModInLocalFunctions.txt @@ -0,0 +1,28 @@ +package + +public fun takeInt(/*0*/ x: kotlin.Int): kotlin.Unit +public fun test1(): kotlin.Unit +public fun test2(): kotlin.Unit + +public final class A { + public constructor A() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + public final operator fun B.rem(/*0*/ x: kotlin.Int): kotlin.Int +} + +public object B { + private constructor B() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public final class C { + public constructor C() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + public final operator fun B.mod(/*0*/ x: kotlin.Int): kotlin.String +} diff --git a/compiler/testData/diagnostics/tests/operatorRem/preferRemWithImplicitReceivers.kt b/compiler/testData/diagnostics/tests/operatorRem/preferRemWithImplicitReceivers.kt new file mode 100644 index 00000000000..a68c2ca89d9 --- /dev/null +++ b/compiler/testData/diagnostics/tests/operatorRem/preferRemWithImplicitReceivers.kt @@ -0,0 +1,19 @@ +// !DIAGNOSTICS: -UNUSED_PARAMETER + +class A { + operator fun Int.mod(s: String) = 4 +} + +class B { + operator fun Int.rem(s: String) = "" +} + +fun test() { + with(B()) { + with(A()) { + takeString(1 % "") + } + } +} + +fun takeString(s: String) {} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/operatorRem/preferRemWithImplicitReceivers.txt b/compiler/testData/diagnostics/tests/operatorRem/preferRemWithImplicitReceivers.txt new file mode 100644 index 00000000000..0505a3a1194 --- /dev/null +++ b/compiler/testData/diagnostics/tests/operatorRem/preferRemWithImplicitReceivers.txt @@ -0,0 +1,20 @@ +package + +public fun takeString(/*0*/ s: kotlin.String): kotlin.Unit +public fun test(): kotlin.Unit + +public final class A { + public constructor A() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + public final operator fun kotlin.Int.mod(/*0*/ s: kotlin.String): kotlin.Int +} + +public final class B { + public constructor B() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + public final operator fun kotlin.Int.rem(/*0*/ s: kotlin.String): kotlin.String +} diff --git a/compiler/testData/diagnostics/tests/operatorRem/resolveModIfRemIsHidden.kt b/compiler/testData/diagnostics/tests/operatorRem/resolveModIfRemIsHidden.kt new file mode 100644 index 00000000000..4ed361ee4be --- /dev/null +++ b/compiler/testData/diagnostics/tests/operatorRem/resolveModIfRemIsHidden.kt @@ -0,0 +1,14 @@ +// !DIAGNOSTICS: -UNUSED_PARAMETER + +object A { + @Deprecated("Use mod instead", ReplaceWith("mod"), DeprecationLevel.HIDDEN) + operator fun rem(x: Int) = 0 + + operator fun mod(x: Int) = "" +} + +fun test() { + takeString(A % 123) +} + +fun takeString(s: String) {} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/operatorRem/resolveModIfRemIsHidden.txt b/compiler/testData/diagnostics/tests/operatorRem/resolveModIfRemIsHidden.txt new file mode 100644 index 00000000000..1865efaa28a --- /dev/null +++ b/compiler/testData/diagnostics/tests/operatorRem/resolveModIfRemIsHidden.txt @@ -0,0 +1,13 @@ +package + +public fun takeString(/*0*/ s: kotlin.String): kotlin.Unit +public fun test(): kotlin.Unit + +public object A { + private constructor A() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public final operator fun mod(/*0*/ x: kotlin.Int): kotlin.String + @kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "Use mod instead", replaceWith = kotlin.ReplaceWith(expression = "mod", imports = {})) public final operator fun rem(/*0*/ x: kotlin.Int): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java index 6e15ae340ac..fd046cc7531 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java @@ -206,18 +206,6 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { doTest(fileName); } - @TestMetadata("DeprecatedModAssignOperatorConventions.kt") - public void testDeprecatedModAssignOperatorConventions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/DeprecatedModAssignOperatorConventions.kt"); - doTest(fileName); - } - - @TestMetadata("DeprecatedModOperatorConventions.kt") - public void testDeprecatedModOperatorConventions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/DeprecatedModOperatorConventions.kt"); - doTest(fileName); - } - @TestMetadata("DeprecatedUnaryOperatorConventions.kt") public void testDeprecatedUnaryOperatorConventions() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/DeprecatedUnaryOperatorConventions.kt"); @@ -13336,12 +13324,30 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/operatorRem"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } + @TestMetadata("DeprecatedModAssignOperatorConventions.kt") + public void testDeprecatedModAssignOperatorConventions() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/DeprecatedModAssignOperatorConventions.kt"); + doTest(fileName); + } + @TestMetadata("deprecatedModConvention.kt") public void testDeprecatedModConvention() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/deprecatedModConvention.kt"); doTest(fileName); } + @TestMetadata("DeprecatedModOperatorConventions.kt") + public void testDeprecatedModOperatorConventions() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/DeprecatedModOperatorConventions.kt"); + doTest(fileName); + } + + @TestMetadata("doNotResolveToInapplicableRem.kt") + public void testDoNotResolveToInapplicableRem() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/doNotResolveToInapplicableRem.kt"); + doTest(fileName); + } + @TestMetadata("noDeprecatedModConventionWithoutFeature.kt") public void testNoDeprecatedModConventionWithoutFeature() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/noDeprecatedModConventionWithoutFeature.kt"); @@ -13372,11 +13378,59 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { doTest(fileName); } + @TestMetadata("preferRemFromCompanionObjectOverRem.kt") + public void testPreferRemFromCompanionObjectOverRem() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/preferRemFromCompanionObjectOverRem.kt"); + doTest(fileName); + } + + @TestMetadata("preferRemOverModInLocalFunctions.kt") + public void testPreferRemOverModInLocalFunctions() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/preferRemOverModInLocalFunctions.kt"); + doTest(fileName); + } + + @TestMetadata("preferRemWithImplicitReceivers.kt") + public void testPreferRemWithImplicitReceivers() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/preferRemWithImplicitReceivers.kt"); + doTest(fileName); + } + @TestMetadata("prefereRemAsExtensionOverMemberMod.kt") public void testPrefereRemAsExtensionOverMemberMod() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/prefereRemAsExtensionOverMemberMod.kt"); doTest(fileName); } + + @TestMetadata("remAndRemAssignAmbiguity.kt") + public void testRemAndRemAssignAmbiguity() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/remAndRemAssignAmbiguity.kt"); + doTest(fileName); + } + + @TestMetadata("remWithModAndModAssign.kt") + public void testRemWithModAndModAssign() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/remWithModAndModAssign.kt"); + doTest(fileName); + } + + @TestMetadata("remWithModAssign.kt") + public void testRemWithModAssign() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/remWithModAssign.kt"); + doTest(fileName); + } + + @TestMetadata("resolveModIfRemIsHidden.kt") + public void testResolveModIfRemIsHidden() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/resolveModIfRemIsHidden.kt"); + doTest(fileName); + } + + @TestMetadata("resolveToModWhenNoOperatorRemFeature.kt") + public void testResolveToModWhenNoOperatorRemFeature() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/resolveToModWhenNoOperatorRemFeature.kt"); + doTest(fileName); + } } @TestMetadata("compiler/testData/diagnostics/tests/operatorsOverloading")