We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raised in scalameta/metals#5478, I've encountered this on my own as well when defining extension methods in companion object for trait.
3.3.1
//> using scala "3.3.1" opaque type Deck = Long object Deck { extension (data: Deck) { def fooSize: Int = ??? } } // import Deck.* // uncomment and semanticDB will be properly generated object DeckUsage { val deck: Deck = ??? deck.fooSize }
Generated semanticDB file doesn't contain entries for fooSize usage in object DeckUsage
fooSize
DeckUsage
Generated semanticDB file doesn't contain entries for fooSize usage in object DeckUsage, without need for an additional import
The text was updated successfully, but these errors were encountered:
@tanishiking can you take a look?
Sorry, something went wrong.
There is the same issue in the presentation compiler, which seems unrelated. Could it due to those extension methods being resolved at a later phase?
It seems like caused by the missing span for extension method https://github.com/lampepfl/dotty/blob/a37dac66b1d48e8ac173dd4b2486b353f8574cc2/compiler/src/dotty/tools/dotc/semanticdb/ExtractSemanticDB.scala#L243 and it might be #18557 will help 👍 FYI @kasiaMarek
Confirmed it is fixed by #18557
fixed by #18557
No branches or pull requests
Raised in scalameta/metals#5478, I've encountered this on my own as well when defining extension methods in companion object for trait.
Compiler version
3.3.1
Minimized code
Output
Generated semanticDB file doesn't contain entries for
fooSize
usage in objectDeckUsage
Expectation
Generated semanticDB file doesn't contain entries for
fooSize
usage in objectDeckUsage
, without need for an additional importThe text was updated successfully, but these errors were encountered: