bug icon indicating copy to clipboard operation
bug copied to clipboard

Inconsistency in handling implicit conversion `Null => Int`

Open sir-wabbit opened this issue 7 years ago • 1 comments

Either both should compile or neither.

scala> def foo(b: Null): Int = b
                               ^
       error: an expression of type Null is ineligible for implicit conversion

scala> def foo(b: Null with Null): Int = b
foo: (b: Null with Null)Int

sir-wabbit avatar Feb 21 '18 20:02 sir-wabbit

heh — Scala 3 (I tested 3.4.0) can be bamboozled in the same way

SethTisue avatar Feb 15 '24 19:02 SethTisue