summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2006-01-20 18:07:53 +0000
committerMartin Odersky <odersky@gmail.com>2006-01-20 18:07:53 +0000
commitb945b6d398974909828a2d07c855267159c06b3d (patch)
tree69e3f1e8838d94152d4a2e46a4751eabba45e86e /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parente95af789da6f4831badf4620a03fca2a8f1bc64a (diff)
downloadscala-b945b6d398974909828a2d07c855267159c06b3d.tar.gz
scala-b945b6d398974909828a2d07c855267159c06b3d.tar.bz2
scala-b945b6d398974909828a2d07c855267159c06b3d.zip
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index cb83e6abbe..0cc3a4667f 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -353,9 +353,8 @@ mixin class Typers requires Analyzer {
(pt <:< functionType(mt.paramTypes map (t => WildcardType), WildcardType))) { // (4.2)
if (settings.debug.value) log("eta-expanding "+tree+":"+tree.tpe+" to "+pt)
typed(etaExpand(tree), mode, pt)
- } else if (!tree.symbol.isConstructor &&
- mt.paramTypes.isEmpty && isCompatible(mt.resultType, pt)) { // (4.3)
- typed(Apply(tree, List()) setPos tree.pos)
+ } else if (!tree.symbol.isConstructor && mt.paramTypes.isEmpty) { // (4.3)
+ adapt(typed(Apply(tree, List()) setPos tree.pos), mode, pt)
} else {
if (context.reportGeneralErrors) {
if (settings.migrate.value && !tree.symbol.isConstructor && isCompatible(mt, pt))