Extension method is not shadowed by regular method #19435
som-snytt
started this conversation in
General Discussion
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was surprised that the extension is not shadowed:
The reference language is "available as a simple name", as in Scala 2, and
def g = ok
in Scala 3 means the localok
and not the extension.Noticed at https://discord.com/channels/632150470000902164/632628489719382036/1195117929155530792 where my surprise was that braces in REPL 3 do not mean
locally
. As shown, the extension becomes an imported member forres1
which is not shadowed.Beta Was this translation helpful? Give feedback.
All reactions