Skip to content

"Find All References" does not work on extension methods #5478

@strelec

Description

@strelec

Describe the bug

In the snippet below, if you search for usages of extension method Deck.size(), Metals only finds the local usage in fooSize, but ignores usages in other classes and files.

opaque type Deck = Long

object Deck {
	extension (data: Deck) {
		def size: Int = java.lang.Long.bitCount(data)
		def fooSize: Int = size
	}
}

Expected behavior

"Find All References" finds references across the whole project.

Operating system

Linux

Editor/Extension

VS Code

Version of Metals

v1.0.0 (newest version)

Extra context or search terms

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixed-upstreamTag a ticket with this when a fix upstream has been completed and we can now address the ticket

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions