Skip to content

Commit

Permalink
Fix propagating location in NamedArgs
Browse files Browse the repository at this point in the history
  • Loading branch information
odersky committed Apr 20, 2020
1 parent 325b921 commit 8c06274
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/src/dotty/tools/dotc/parsing/Parsers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1998,7 +1998,8 @@ object Parsers {
t match
case Ident(_) | Select(_, _) | Apply(_, _) =>
atSpan(startOffset(t), in.skipToken()) {
Assign(t, subPart(() => expr(location)))
val loc = if location.inArgs then location else Location.ElseWhere
Assign(t, subPart(() => expr(loc)))
}
case _ =>
t
Expand Down

0 comments on commit 8c06274

Please sign in to comment.