Raise deprecation level for mod operators to ERROR in stdlib

#KT-25217 In Progress
This commit is contained in:
Mikhail Zarechenskiy
2018-09-07 11:44:37 +03:00
parent b12e0aab2f
commit 7595cb23ab
15 changed files with 109 additions and 89 deletions
+1 -1
View File
@@ -174,7 +174,7 @@ class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) {
out.println(" @SinceKotlin(\"1.1\")")
"mod" ->
out.println(" @Deprecated(\"Use rem(other) instead\", ReplaceWith(\"rem(other)\"), DeprecationLevel.WARNING)")
out.println(" @Deprecated(\"Use rem(other) instead\", ReplaceWith(\"rem(other)\"), DeprecationLevel.ERROR)")
}
out.println(" public operator fun $name(other: ${otherKind.capitalized}): ${returnType.capitalized}")
}
@@ -38,6 +38,8 @@ fun generate(): String {
val sb = StringBuilder()
val p = Printer(sb)
p.println(File("license/LICENSE.txt").readText())
p.println("@file:Suppress(\"DEPRECATION_ERROR\")")
p.println()
p.println("package org.jetbrains.kotlin.resolve.constants.evaluate")
p.println()
p.println("import java.math.BigInteger")