Skip to content

Commit 9153a1b

Browse files
committed
Address reviewer comments
1 parent c35bbe7 commit 9153a1b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/dotty/tools/dotc/transform/PostTyper.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisTran
112112
// If `args` is a list of named argiments, return corresponding type parameters,
113113
// or abstract types otherwise return type parameters unchanged
114114
def matchNamed(tparams: List[TypeSymbol], args: List[Tree]): List[Symbol] = args match {
115-
case (arg: NamedArg) :: _ =>
116-
for (NamedArg(name, arg) <- args) yield tycon.tpe.member(name).symbol
115+
case (_: NamedArg) :: _ =>
116+
for (NamedArg(name, _) <- args) yield tycon.tpe.member(name).symbol
117117
case _ =>
118118
tparams
119119
}

src/dotty/tools/dotc/typer/TypeAssigner.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ trait TypeAssigner {
375375
val tparams = tycon.tpe.typeParams
376376
def refineNamed(tycon: Type, arg: Tree) = arg match {
377377
case ast.Trees.NamedArg(name, argtpt) =>
378+
// Dotty deviation: importing ast.Trees._ and matching on NamedArg gives a cyclic ref error
378379
val tparam = tparams.find(_.name == name) match {
379380
case Some(tparam) => tparam
380381
case none =>

0 commit comments

Comments
 (0)