Closed
Description
Compiler version
3.6.2
Minimized code
//extension (s: java.lang.String) def length = 42 // warn
extension (s: String) def length = 42 // nowarn
Output
-- [E194] Potential Issue Warning: .../no-extension.scala:2:36 --
2 |extension (s: java.lang.String) def length = 42
| ^
|Extension method length will never be selected
|because String already has a member with the same name and compatible parameter types.
Expectation
The Scala alias should also warn, obviously.
Noticed at #17821.