aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Applications.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-11-15 12:25:13 +0100
committerMartin Odersky <odersky@gmail.com>2013-11-15 12:25:13 +0100
commit18da7faf93ffaefa0ee7e37211c740c1f34ddfa2 (patch)
tree272e28de24a61720d8cf278124c325afdfc0823c /src/dotty/tools/dotc/typer/Applications.scala
parent7a9e632c64865084e6e8559a0e6ea90e2b706a8b (diff)
downloaddotty-18da7faf93ffaefa0ee7e37211c740c1f34ddfa2.tar.gz
dotty-18da7faf93ffaefa0ee7e37211c740c1f34ddfa2.tar.bz2
dotty-18da7faf93ffaefa0ee7e37211c740c1f34ddfa2.zip
Tweaks to adaptation and interpolation
1. Needed to interpolate aftyer implicit parameyters are added. 2. Also needed to avoid constraining typevars if compared against selection proto. Original coder example now typechecks.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Applications.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Applications.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala
index 201f928a9..ba67d2b1e 100644
--- a/src/dotty/tools/dotc/typer/Applications.scala
+++ b/src/dotty/tools/dotc/typer/Applications.scala
@@ -356,7 +356,7 @@ trait Applications extends Compatibility { self: Typer =>
init()
def addArg(arg: Tree, formal: Type): Unit =
- typedArgBuf += adapt(arg, formal)
+ typedArgBuf += adaptInterpolated(arg, formal)
def makeVarArg(n: Int, elemFormal: Type): Unit = {
val args = typedArgBuf.takeRight(n).toList
@@ -467,7 +467,7 @@ trait Applications extends Compatibility { self: Typer =>
} { failed => fun1 match {
case Select(qual, name) =>
tryEither { implicit ctx =>
- val qual1 = adapt(qual, new SelectionProto(name, proto))
+ val qual1 = adaptInterpolated(qual, new SelectionProto(name, proto))
if (qual1.tpe.isError || (qual1 eq qual)) qual1
else
typedApply(