Closed som-snytt closed 1 year ago
scala.Predef.type
presumably.
The doc says
/** Conditions where we omit the prefix when printing a symbol, to avoid
* unpleasantries like Predef.String, $read.$iw.Foo and <empty>.Bippy.
*/
final def isOmittablePrefix
Reproduction steps
Scala version: 2.13.10
Problem
What is it trying to render as the type
type
?The context was a bit tricky:
Masculine swagger made me try writing
eq(that)
instead of the usualthis.eq(that)
, erroneous forxs.eq(that)
.Proper style dictates that all universal (plus
AnyRef
) methods require an explicit receiver, because otherwise you never know.Note that without the import (which exists for reasons of hygiene, ironically),
Note that ArrayOps extends Any, not AnyRef.
because the methods are not root-imported fromPredef
.