aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Inferencing.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-01-09 20:34:30 +0100
committerMartin Odersky <odersky@gmail.com>2014-01-09 20:34:30 +0100
commit5df489a794d5a7d0e70fcfeb968b6e4bb9cd9953 (patch)
treeef285705ba0a1c4c12094e35be202ea25eab1df4 /src/dotty/tools/dotc/typer/Inferencing.scala
parent0b2de1b4f48655b81796cfdf80c087443f3d0fda (diff)
downloaddotty-5df489a794d5a7d0e70fcfeb968b6e4bb9cd9953.tar.gz
dotty-5df489a794d5a7d0e70fcfeb968b6e4bb9cd9953.tar.bz2
dotty-5df489a794d5a7d0e70fcfeb968b6e4bb9cd9953.zip
Special case Unit for result type conformance check.
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 545048016..570eabc8d 100644
--- a/src/dotty/tools/dotc/typer/Inferencing.scala
+++ b/src/dotty/tools/dotc/typer/Inferencing.scala
@@ -51,7 +51,7 @@ object Inferencing {
case _ =>
true
}
- case pt: ValueType =>
+ case pt: ValueType if !(pt isRef defn.UnitClass) =>
mt match {
case mt: MethodType =>
mt.isDependent || isCompatible(normalize(mt, pt), pt)