aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Applications.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-12-02 16:00:07 +0100
committerMartin Odersky <odersky@gmail.com>2015-12-06 16:09:21 +0100
commit73bf06b4735b8a74c99ed185e52ae3350181f426 (patch)
tree60320e0261ebc0eecf54e5aedf99311f762cef78 /src/dotty/tools/dotc/typer/Applications.scala
parent2abcd02d2a2067ba78430262664f5d3ab9b61d00 (diff)
downloaddotty-73bf06b4735b8a74c99ed185e52ae3350181f426.tar.gz
dotty-73bf06b4735b8a74c99ed185e52ae3350181f426.tar.bz2
dotty-73bf06b4735b8a74c99ed185e52ae3350181f426.zip
More uses of adaptIfHK
Also: fix EtaExpansion. Also: Add some debug code to Applications, awaiting further fixes.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Applications.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Applications.scala8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala
index 4ca9c39af..e8ba3b07b 100644
--- a/src/dotty/tools/dotc/typer/Applications.scala
+++ b/src/dotty/tools/dotc/typer/Applications.scala
@@ -613,8 +613,12 @@ trait Applications extends Compatibility { self: Typer =>
assignType(cpy.TypeApply(tree)(typedFn, typedArgs), typedFn, typedArgs)
}
- def adaptTypeArg(tree: tpd.Tree, bound: Type)(implicit ctx: Context): tpd.Tree =
- tree.withType(tree.tpe.EtaExpandIfHK(bound))
+ def adaptTypeArg(tree: tpd.Tree, bound: Type)(implicit ctx: Context): tpd.Tree = {
+ val was = tree.tpe.EtaExpandIfHK(bound)
+ //val now = tree.tpe.adaptIfHK(bound) // ###
+ //if (was != now) println(i"diff adapt ${tree.tpe} to $bound, was: $was, now: $now")
+ tree.withType(was)//tree.tpe.adaptIfHK(bound))
+ }
/** Rewrite `new Array[T](....)` trees to calls of newXYZArray methods. */
def convertNewArray(tree: tpd.Tree)(implicit ctx: Context): tpd.Tree = tree match {