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
➜~~/projects/dotty/bin/scala
Welcome to Scala3.3.2-RC1-bin-SNAPSHOT-git-8948092 (20.0.1, JavaOpenJDK64-BitServerVM).
Type in expressions for evaluation. Ortry:help.
scala>objectO { vala=1 }
// defined object O
scala>importO.{a=>b, a}
-- [E122] SyntaxError:------------------------------------------------------------------------------------------------1|importO.{a=>b, a}
|^| a is renamed twice on the same importline.
1 error found
scala>importO.{a=>b, toString=>b}
scala>
Output
// as shown
Expectation
The aliasing import is fine, but introducing the same name twice is not.
The spec does not constrain import selectors, so technically any warning or error is a lint.
Compiler version
3.3.2-RC1-bin-SNAPSHOT-git-8948092
Minimized code
Output
// as shown
Expectation
The aliasing import is fine, but introducing the same name twice is not.
The spec does not constrain import selectors, so technically any warning or error is a lint.
scala/bug#12813
The text was updated successfully, but these errors were encountered: