aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dotty/tools/dotc/ast/untpd.scala10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/ast/untpd.scala b/src/dotty/tools/dotc/ast/untpd.scala
index f009d6a86..5db893ff2 100644
--- a/src/dotty/tools/dotc/ast/untpd.scala
+++ b/src/dotty/tools/dotc/ast/untpd.scala
@@ -228,7 +228,15 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
def makeSyntheticParameter(n: Int = 1, tpt: Tree = TypeTree())(implicit ctx: Context): ValDef =
ValDef(nme.syntheticParamName(n), tpt, EmptyTree).withFlags(SyntheticTermParam)
- def refOfDef(tree: NameTree)(implicit ctx: Context) = Ident(tree.name)
+ /** A reference to given definition. If definition is a repeated
+ * parameter, the reference will be a repeated argument.
+ */
+ def refOfDef(tree: MemberDef)(implicit ctx: Context) = tree match {
+ case ValDef(_, PostfixOp(_, nme.raw.STAR), _) =>
+ Typed(Ident(tree.name), Ident(tpnme.WILDCARD_STAR))
+ case _ =>
+ Ident(tree.name)
+ }
// ------- Decorators -------------------------------------------------