-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Labels
Milestone
Description
In Scala 2.12.13, parser warnings are reported twice, or even trice. Typer warnings once.
scala> case class C(implicit x: Int)
<console>:1: warning: case classes should have a non-implicit parameter list; adapting to 'case class C()(...)'
case class C(implicit x: Int)
^
<console>:11: warning: case classes should have a non-implicit parameter list; adapting to 'case class C()(...)'
case class C(implicit x: Int)
^
defined class C
scala> for {x <- Nil; val y = 1} yield y
<console>:1: warning: val keyword in for comprehension is deprecated
for {x <- Nil; val y = 1} yield y
^
<console>:2: warning: val keyword in for comprehension is deprecated
for {x <- Nil; val y = 1} yield y
^
<console>:12: warning: val keyword in for comprehension is deprecated
for {x <- Nil; val y = 1} yield y
^
res0: List[Int] = List()
scala> try 1
<console>:12: warning: A try without a catch or finally is equivalent to putting its body in a block; no exceptions are handled.
try 1
^
res1: Int = 1Reactions are currently unavailable