aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-01-17 12:24:26 +0100
committerMartin Odersky <odersky@gmail.com>2016-02-19 14:00:01 +0100
commit03a880526a5da369d7f7fdcb07bfa3207375f829 (patch)
tree7f77639bec5251a69fb16230deae11c5280114ca
parent70e27f8a6f7943e8913a194fd69a4e73cc6fde1b (diff)
downloaddotty-03a880526a5da369d7f7fdcb07bfa3207375f829.tar.gz
dotty-03a880526a5da369d7f7fdcb07bfa3207375f829.tar.bz2
dotty-03a880526a5da369d7f7fdcb07bfa3207375f829.zip
Address reviewer comments
-rw-r--r--src/dotty/tools/dotc/typer/Checking.scala4
-rw-r--r--src/dotty/tools/dotc/typer/TypeAssigner.scala1
2 files changed, 3 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/typer/Checking.scala b/src/dotty/tools/dotc/typer/Checking.scala
index f18c5bf7c..fec5b86f8 100644
--- a/src/dotty/tools/dotc/typer/Checking.scala
+++ b/src/dotty/tools/dotc/typer/Checking.scala
@@ -57,8 +57,8 @@ object Checking {
// If `args` is a list of named arguments, return corresponding type parameters,
// otherwise return type parameters unchanged
def matchNamed(tparams: List[TypeSymbol], args: List[Tree]): List[Symbol] = args match {
- case (arg: NamedArg) :: _ =>
- for (NamedArg(name, arg) <- args) yield tycon.tpe.member(name).symbol
+ case (_: NamedArg) :: _ =>
+ for (NamedArg(name, _) <- args) yield tycon.tpe.member(name).symbol
case _ =>
tparams
}
diff --git a/src/dotty/tools/dotc/typer/TypeAssigner.scala b/src/dotty/tools/dotc/typer/TypeAssigner.scala
index 6d4a7841e..5282ca5d3 100644
--- a/src/dotty/tools/dotc/typer/TypeAssigner.scala
+++ b/src/dotty/tools/dotc/typer/TypeAssigner.scala
@@ -380,6 +380,7 @@ trait TypeAssigner {
val tparams = tycon.tpe.typeParams
def refineNamed(tycon: Type, arg: Tree) = arg match {
case ast.Trees.NamedArg(name, argtpt) =>
+ // Dotty deviation: importing ast.Trees._ and matching on NamedArg gives a cyclic ref error
val tparam = tparams.find(_.name == name) match {
case Some(tparam) => tparam
case none =>