aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Applications.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-12-22 18:34:00 +0100
committerMartin Odersky <odersky@gmail.com>2013-12-22 18:58:18 +0100
commit6ed666c4be5bc4904c926a265d711b85f729d4b3 (patch)
treebfd51f640ecd89eb3a6d111213747af77c68dde2 /src/dotty/tools/dotc/typer/Applications.scala
parent108be8880688653de490975f29f6ae469e9f3e6a (diff)
downloaddotty-6ed666c4be5bc4904c926a265d711b85f729d4b3.tar.gz
dotty-6ed666c4be5bc4904c926a265d711b85f729d4b3.tar.bz2
dotty-6ed666c4be5bc4904c926a265d711b85f729d4b3.zip
Typing by-name parameters with ExprTypes.
To avoid duplication between by-name parameters and expr types, we treat by-name parameters as as having ExprType. A part of this is introducing ByNameTypeTree, a specific tree class for => T types.
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 860a7be80..9efa7d49e 100644
--- a/src/dotty/tools/dotc/typer/Applications.scala
+++ b/src/dotty/tools/dotc/typer/Applications.scala
@@ -360,7 +360,7 @@ trait Applications extends Compatibility { self: Typer =>
init()
def addArg(arg: Tree, formal: Type): Unit =
- typedArgBuf += adaptInterpolated(arg, formal.widenByName)
+ typedArgBuf += adaptInterpolated(arg, formal.widenExpr)
def makeVarArg(n: Int, elemFormal: Type): Unit = {
val args = typedArgBuf.takeRight(n).toList
@@ -433,7 +433,7 @@ trait Applications extends Compatibility { self: Typer =>
/** Subclass of Application for type checking an Apply node with untyped arguments. */
class ApplyToUntyped(app: untpd.Apply, fun: Tree, methRef: TermRef, proto: FunProto, resultType: Type)(implicit ctx: Context)
extends TypedApply(app, fun, methRef, proto.args, resultType) {
- def typedArg(arg: untpd.Tree, formal: Type): TypedArg = proto.typedArg(arg, formal.widenByName)
+ def typedArg(arg: untpd.Tree, formal: Type): TypedArg = proto.typedArg(arg, formal.widenExpr)
def treeToArg(arg: Tree): untpd.Tree = untpd.TypedSplice(arg)
}