I’ve accidentally written this line of code:
scala> val f = Int
f: Int.type = object scala.Int
Seems to work for every subtype of AnyVal except for AnyVal itself.
Is there anything I can use f for or is it just an implementation detail of Scala leaking out?
The
Intcompanion object is documented here. It doesn’t provide a lot, but here are a couple things: