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
As the unique name generator does not know about the name on class $anon$1, it will give the same name to the class for new Object { }. The result is a corrupted scope where both names refer to the same symbol and get stuck in an infinite loop.
The current wording in the spec is something like this: "Names with $'s in them are reserved, and should not be used in programs. If a program does use such names the results are unspecified". I think we should not try to change this.
As the unique name generator does not know about the name on
class $anon$1
, it will give the same name to the class fornew Object { }
. The result is a corrupted scope where both names refer to the same symbol and get stuck in an infinite loop.Same for methods
There are two possible solutions
FreshNameCreator
Which one should we choose? I am more inclined to the first one as it simplifies the interaction with #2999
scalac
has the same issue scala/bug#10492The text was updated successfully, but these errors were encountered: