You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scala>System.getClass
java.lang.NoClassDefFoundError: java/lang/System$
at rs$line$1$.<init>(rs$line$1:1)
...
with Scala 2:
scala>System.getClass
<console>:12:error: value getClass is not a member of objectSystemNote that SystemextendsAny, not AnyRef.
Such types can participate in value classes, but instances
cannot appear in singleton types or in reference comparisons.
System.getClass
The text was updated successfully, but these errors were encountered:
The Scala 2 error doesn't make a lot of sense either.
Scala doesn't treat System as an object. It just has some kind of magical treatment of Java defined classes with static methods.
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Mar 6, 2020
With Dotty:
with Scala 2:
The text was updated successfully, but these errors were encountered: