Nicolas Rinaudo
Nicolas Rinaudo

Reputation: 6168

Implicit numeric widening in Scala 2.10, but not 2.11 or 2.12

I'm running in a very odd scalac behaviour. This is the code I'm trying to compile:

case class A(a: Char, b: Char)

For some reason, when enabling the -Ywarn-numeric-widen flag (which I do for all my projects, as well as -Xfatal-warnings):

I'm not sure where the warning comes from, nor how to work around it. I'm hoping for a solution that doesn't involve dropping support for 2.10 or force me to "weaken" my compilation process...

Upvotes: 1

Views: 776

Answers (1)

Nicolas Rinaudo
Nicolas Rinaudo

Reputation: 6168

Turns out it's a known scalac bug - supposed to have been fixed, but apparently not well enough: https://issues.scala-lang.org/browse/SI-8340

Upvotes: 1

Related Questions