Skip to content

Commit 5b5b479

Browse files
committed
Revert deprecation exclusion for companion
1 parent c06a80a commit 5b5b479

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

library/src/scala/io/Position.scala

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
package scala
1414
package io
1515

16+
import annotation.nowarn
17+
1618
/** The object Position provides convenience methods to encode
1719
* line and column number in one single integer. The encoded line
1820
* (column) numbers range from 0 to `LINE_MASK` (`COLUMN_MASK`),
@@ -71,13 +73,12 @@ private[scala] abstract class Position {
7173
def toString(pos: Int): String = line(pos) + ":" + column(pos)
7274
}
7375

76+
@nowarn
7477
private[scala] object Position extends Position {
7578
def checkInput(line: Int, column: Int): Unit = {
7679
if (line < 0)
77-
throw new IllegalArgumentException(line + " < 0")
78-
if ((line == 0) && (column != 0))
79-
throw new IllegalArgumentException(line + "," + column + " not allowed")
80-
if (column < 0)
81-
throw new IllegalArgumentException(line + "," + column + " not allowed")
80+
throw new IllegalArgumentException(s"$line < 0")
81+
if (line == 0 && column != 0 || column < 0)
82+
throw new IllegalArgumentException(s"$line,$column not allowed")
8283
}
8384
}

library/src/scala/languageFeature.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ object languageFeature {
3535
@deprecated("scala.language.higherKinds no longer needs to be imported explicitly", "2.13.1")
3636
@meta.languageFeature("higher-kinded type", enableRequired = false)
3737
sealed trait higherKinds
38+
@deprecated("scala.language.higherKinds no longer needs to be imported explicitly", "2.13.1")
3839
object higherKinds extends higherKinds
3940

4041
@meta.languageFeature("#, which cannot be expressed by wildcards,", enableRequired = false)

0 commit comments

Comments
 (0)