aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-10-31 12:18:45 +0100
committerMartin Odersky <odersky@gmail.com>2013-10-31 12:18:45 +0100
commit1c17a0f83639ddc4b0fd3ffd294a6a97c887aae3 (patch)
treec0e59758f368aaa413c8f90a0a32b6b2603646a6 /src/dotty/tools/dotc/typer/Typer.scala
parentdbaf6f42da9e5eb950d1a21b1912d417536330f7 (diff)
downloaddotty-1c17a0f83639ddc4b0fd3ffd294a6a97c887aae3.tar.gz
dotty-1c17a0f83639ddc4b0fd3ffd294a6a97c887aae3.tar.bz2
dotty-1c17a0f83639ddc4b0fd3ffd294a6a97c887aae3.zip
To tweaks to derivedRefinedType for higher-kinded types.
1. The calculation of type parameters was wrong, and is fixed now. 2. The kind of bounds might need to be adjusted in the derived types. Example: Assume type CC[+T] class C[T] If we start with the HK-type CC[A] this is encoded as covariant: CC { type _$hk0 += A }. But once we substitute C for CC, the refined info bounds need to become non-variant. It used to be C { type T += A }; now it's been corrected to be C { type T = A }.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index 244713496..d607d547b 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -1054,8 +1054,8 @@ class Typer extends Namer with Applications with Implicits {
if (tree.tpe <:< pt) tree
else if (ctx.mode is Mode.Pattern) tree // no subtype check for pattern
else {
- //println(s"adapt to subtype ${tree.tpe} !<:< $pt") // !!!DEBUG
- //println(TypeComparer.explained(implicit ctx => tree.tpe <:< pt))
+ println(s"adapt to subtype ${tree.tpe} !<:< $pt") // !!!DEBUG
+ println(TypeComparer.explained(implicit ctx => tree.tpe <:< pt)) // !!!DEBUG
adaptToSubType(wtp)
}
}