File tree 2 files changed +7
-1
lines changed
compiler/src/dotty/tools/dotc/ast
language-server/test/dotty/tools/languageserver
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1158,7 +1158,7 @@ object desugar {
1158
1158
mods & Lazy | Synthetic | (if (ctx.owner.isClass) PrivateLocal else EmptyFlags )
1159
1159
val firstDef =
1160
1160
ValDef (tmpName, TypeTree (), matchExpr)
1161
- .withSpan(pat.span.union(rhs.span) ).withMods(patMods)
1161
+ .withSpan(pat.span.startPos ).withMods(patMods)
1162
1162
val useSelectors = vars.length <= 22
1163
1163
def selector (n : Int ) =
1164
1164
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 {
231
231
| """ .withSource
232
232
.hover(m1 to m2, hoverContent(" example.TestEnum3" ))
233
233
}
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
+ }
234
240
}
You can’t perform that action at this time.
0 commit comments