From 9df576db2d315fca23ece4af822b130ae15d032d Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Tue, 1 May 2012 15:22:52 +0200 Subject: partial fun synth typing under correct pt --- src/compiler/scala/tools/nsc/typechecker/Typers.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/compiler') diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index b827f2ac1a..b55406761d 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -2320,7 +2320,7 @@ trait Typers extends Modes with Adaptations with Taggings { anonClass setInfo ClassInfoType(parents, newScope, anonClass) methodSym setInfoAndEnter MethodType(paramSyms, resTp) - DefDef(methodSym, methodBodyTyper.virtualizedMatch(match_, mode, pt)) + DefDef(methodSym, methodBodyTyper.virtualizedMatch(match_, mode, resTp)) } } @@ -2359,7 +2359,7 @@ trait Typers extends Modes with Adaptations with Taggings { match_ setType B1.tpe // the default uses applyOrElse's first parameter since the scrut's type has been widened - val body = methodBodyTyper.virtualizedMatch(match_ withAttachment DefaultOverrideMatchAttachment(REF(default) APPLY (REF(x))), mode, pt) + val body = methodBodyTyper.virtualizedMatch(match_ withAttachment DefaultOverrideMatchAttachment(REF(default) APPLY (REF(x))), mode, B1.tpe) DefDef(methodSym, body) } @@ -2377,7 +2377,7 @@ trait Typers extends Modes with Adaptations with Taggings { methodSym setInfoAndEnter MethodType(paramSyms, BooleanClass.tpe) val match_ = methodBodyTyper.typedMatch(selector, casesTrue, mode, BooleanClass.tpe) - val body = methodBodyTyper.virtualizedMatch(match_ withAttachment DefaultOverrideMatchAttachment(FALSE_typed), mode, pt) + val body = methodBodyTyper.virtualizedMatch(match_ withAttachment DefaultOverrideMatchAttachment(FALSE_typed), mode, BooleanClass.tpe) DefDef(methodSym, body) } -- cgit v1.2.3