aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/printing
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2017-03-09 10:20:25 +0100
committerGitHub <noreply@github.com>2017-03-09 10:20:25 +0100
commit8e5c9c4a1a4555883307b7e81fea064134f350f2 (patch)
treee2feee0b87ed785e32ed8ba8fa2953128498f917 /compiler/src/dotty/tools/dotc/printing
parent6abaa109e1add82f4add605a5cb3243e34b1ee33 (diff)
parentc7f1f35c36593ac9454c8572a59c649610829b6a (diff)
downloaddotty-8e5c9c4a1a4555883307b7e81fea064134f350f2.tar.gz
dotty-8e5c9c4a1a4555883307b7e81fea064134f350f2.tar.bz2
dotty-8e5c9c4a1a4555883307b7e81fea064134f350f2.zip
Merge pull request #2045 from dotty-staging/fix-hlist-hmap
Fix type inference for HLists and HMaps
Diffstat (limited to 'compiler/src/dotty/tools/dotc/printing')
-rw-r--r--compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala b/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala
index 0d1068b8c..6af902d1b 100644
--- a/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala
+++ b/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala
@@ -4,6 +4,7 @@ package printing
import core._
import Texts._, Types._, Flags._, Names._, Symbols._, NameOps._, Constants._, Denotations._
import Contexts.Context, Scopes.Scope, Denotations.Denotation, Annotations.Annotation
+import TypeApplications.AppliedType
import StdNames.{nme, tpnme}
import ast.Trees._, ast._
import typer.Implicits._
@@ -119,10 +120,11 @@ class PlainPrinter(_ctx: Context) extends Printer {
}
/** The longest sequence of refinement types, starting at given type
- * and following parents.
+ * and following parents, but stopping at applied types.
*/
private def refinementChain(tp: Type): List[Type] =
tp :: (tp match {
+ case AppliedType(_, _) => Nil
case tp: RefinedType => refinementChain(tp.parent.stripTypeVar)
case _ => Nil
})