Skip to content

Commit bf5c8d1

Browse files
committed
Skip NamedArg in underlyingArgument
1 parent 87d555a commit bf5c8d1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

compiler/src/dotty/tools/dotc/ast/tpd.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -952,6 +952,8 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
952952
}
953953
case Inlined(_, _, arg) =>
954954
arg.underlyingArgument
955+
case NamedArg(_, arg) =>
956+
arg.underlyingArgument
955957
case tree =>
956958
super.transform(tree)
957959
}

tests/run/i5119b.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Term.NamedArg("arg1", Term.Apply(Term.Ident("foo"), List(Term.Literal(Constant.Int(1)))))
2-
Term.NamedArg("arg2", Term.Apply(Term.Ident("foo"), List(Term.Literal(Constant.Int(2)))))
1+
Term.Apply(Term.Ident("foo"), List(Term.Literal(Constant.Int(1))))
2+
Term.Apply(Term.Ident("foo"), List(Term.Literal(Constant.Int(2))))
33
Term.Apply(Term.Ident("foo"), List(Term.Literal(Constant.Int(4))))
44
Term.Apply(Term.Ident("foo"), List(Term.Literal(Constant.Int(3))))

0 commit comments

Comments
 (0)