-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
The scala documentation imposes restrictions for naming of implicit classes:
There may not be any method, member or object in scope with the same name as the implicit class.
object Bar
implicit class Bar(x: Int) // BAD!
val x = 5
implicit class x(y: Int) // BAD!However these restrictions don't seem to be enforced, the following code snipped compiles with scalac:
class Test {
object Bar
implicit class Bar(x: Int) // OK
}
class Test2 {
val x = 5
implicit class x(y: Int) // OK
}What do we want to do in Dotty? I think it is related to #2464