File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
compiler/src/dotty/tools/dotc/ast
language-server/test/dotty/tools/languageserver Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1158,7 +1158,7 @@ object desugar {
11581158 mods & Lazy | Synthetic | (if (ctx.owner.isClass) PrivateLocal else EmptyFlags )
11591159 val firstDef =
11601160 ValDef (tmpName, TypeTree (), matchExpr)
1161- .withSpan(pat.span.union(rhs.span) ).withMods(patMods)
1161+ .withSpan(pat.span.startPos ).withMods(patMods)
11621162 val useSelectors = vars.length <= 22
11631163 def selector (n : Int ) =
11641164 if useSelectors then Select (Ident (tmpName), nme.selectorName(n))
Original file line number Diff line number Diff line change @@ -231,4 +231,10 @@ class HoverTest {
231231 | """ .withSource
232232 .hover(m1 to m2, hoverContent(" example.TestEnum3" ))
233233 }
234+
235+ @ Test def tuple : Unit = {
236+ code """ |object A:
237+ | val ( ${m1}first ${m2}, second) = (1, 2) """ .withSource
238+ .hover(m1 to m2, hoverContent(" Int" ))
239+ }
234240}
You can’t perform that action at this time.
0 commit comments