typelevel / scala

Typelevel Scala, a fork of Scala
http://typelevel.org/scala/
372 stars 21 forks source link

Unexpected widening of singleton value operations #160

Closed soronpo closed 6 years ago

soronpo commented 7 years ago
final val a : 1 = 1
final val fails : 2 = a + a //fail
final val works : 2 = a + 1

final val aok = 1
final val also_works : 2 = aok + aok 

FYI, compiles in dotty.

milessabin commented 6 years ago

Fixed in https://github.com/milessabin/scala/commit/d7f1115047f73a9c7b5921bf11745e44fa4676fc.