aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/typer
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-03-17 15:12:02 +0100
committerMartin Odersky <odersky@gmail.com>2017-04-06 13:15:28 +0200
commit4bfc17365518e6014895ae1aaa51517648b46df2 (patch)
tree16e7bc39228a4dbb8156fa5a483f0879ede60097 /compiler/src/dotty/tools/dotc/typer
parent5fe6f54de36224974bdd3a9169f899f6df25971e (diff)
downloaddotty-4bfc17365518e6014895ae1aaa51517648b46df2.tar.gz
dotty-4bfc17365518e6014895ae1aaa51517648b46df2.tar.bz2
dotty-4bfc17365518e6014895ae1aaa51517648b46df2.zip
Eliminate MethodOrPoly
Replace with LambdaType
Diffstat (limited to 'compiler/src/dotty/tools/dotc/typer')
-rw-r--r--compiler/src/dotty/tools/dotc/typer/Applications.scala2
-rw-r--r--compiler/src/dotty/tools/dotc/typer/Typer.scala2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/Applications.scala b/compiler/src/dotty/tools/dotc/typer/Applications.scala
index 236bc051e..cd7c7fd66 100644
--- a/compiler/src/dotty/tools/dotc/typer/Applications.scala
+++ b/compiler/src/dotty/tools/dotc/typer/Applications.scala
@@ -1059,7 +1059,7 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
if (tp1.isVarArgsMethod && tp2.isVarArgsMethod) tp1.paramInfos map repeatedToSingle
else tp1.paramInfos
isApplicable(alt2, formals1, WildcardType) ||
- tp1.paramInfos.isEmpty && tp2.isInstanceOf[MethodOrPoly]
+ tp1.paramInfos.isEmpty && tp2.isInstanceOf[LambdaType]
case tp1: PolyType => // (2)
val tparams = ctx.newTypeParams(alt1.symbol, tp1.paramNames, EmptyFlags, tp1.instantiateBounds)
isAsSpecific(alt1, tp1.instantiate(tparams map (_.typeRef)), alt2, tp2)
diff --git a/compiler/src/dotty/tools/dotc/typer/Typer.scala b/compiler/src/dotty/tools/dotc/typer/Typer.scala
index 145410f65..37f43f21c 100644
--- a/compiler/src/dotty/tools/dotc/typer/Typer.scala
+++ b/compiler/src/dotty/tools/dotc/typer/Typer.scala
@@ -1741,7 +1741,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
def adapt(tree: Tree, pt: Type, original: untpd.Tree = untpd.EmptyTree)(implicit ctx: Context): Tree = /*>|>*/ track("adapt") /*<|<*/ {
/*>|>*/ ctx.traceIndented(i"adapting $tree of type ${tree.tpe} to $pt", typr, show = true) /*<|<*/ {
if (tree.isDef) interpolateUndetVars(tree, tree.symbol)
- else if (!tree.tpe.widen.isInstanceOf[MethodOrPoly]) interpolateUndetVars(tree, NoSymbol)
+ else if (!tree.tpe.widen.isInstanceOf[LambdaType]) interpolateUndetVars(tree, NoSymbol)
tree.overwriteType(tree.tpe.simplified)
adaptInterpolated(tree, pt, original)
}