-
Notifications
You must be signed in to change notification settings - Fork 389
Open
scala/scala3
#23888Labels
Scala 3Generic ticket relating to Scala 3Generic ticket relating to Scala 3presentation-compilerSomething relating to the presentation compilerSomething relating to the presentation compilerspree
Description
Describe the bug
Extension methods from companion object are suggested only after (some) Object
methods, Product
methods and even orphan extensions like ensuring
.
Foo.scala
case class Foo()
object Foo:
extension (f: Foo)
def qux: Unit = ()
test.scala
val _ = Foo().@@

Seems like of the Object
methods, only the ones that are overridden by compiler-generated methods of a case class
rank higher, but that's still unwanted.
Expected behavior
I'd expect extension methods from the companion object to be suggested before orphan extension methods.
It'd be useful to also de-prioritize methods inherited from Object
and Product
.
Operating system
None
Editor/Extension
VS Code
Version of Metals
v1.6.0
Scala version/s
3.7.1
Extra context or search terms
No response
virtual-architect, tigidar and ericvtheg
Metadata
Metadata
Assignees
Labels
Scala 3Generic ticket relating to Scala 3Generic ticket relating to Scala 3presentation-compilerSomething relating to the presentation compilerSomething relating to the presentation compilerspree