aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Inferencing.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/Inferencing.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/Inferencing.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Inferencing.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Inferencing.scala b/src/dotty/tools/dotc/typer/Inferencing.scala
index 81e03f696..c306b07f3 100644
--- a/src/dotty/tools/dotc/typer/Inferencing.scala
+++ b/src/dotty/tools/dotc/typer/Inferencing.scala
@@ -30,7 +30,7 @@ object Inferencing {
* 3. there is an implicit conversion from `tp` to `pt`.
*/
def isCompatible(tp: Type, pt: Type)(implicit ctx: Context): Boolean =
- tp.widenByName <:< pt.widenByName || viewExists(tp, pt)
+ tp.widenExpr <:< pt.widenExpr || viewExists(tp, pt)
/** Test compatibility after normalization in a fresh typerstate. */
def normalizedCompatible(tp: Type, pt: Type)(implicit ctx: Context) = {