Created
February 1, 2012 05:05
-
-
Save lyricallogical/1715208 to your computer and use it in GitHub Desktop.
virtpatmat diff for type error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/compiler/scala/tools/nsc/typechecker/PatMatVirtualiser.scala b/src/compiler/scala/tools/nsc/typechecker/PatMatVirtualiser.sc | |
ala | |
index 4457940..8642727 100644 | |
--- a/src/compiler/scala/tools/nsc/typechecker/PatMatVirtualiser.scala | |
+++ b/src/compiler/scala/tools/nsc/typechecker/PatMatVirtualiser.scala | |
@@ -648,7 +648,7 @@ defined class Foo */ | |
trait TreeMakers { | |
def inMatchMonad(tp: Type): Type = appliedType(matchingMonadType, List(tp)) | |
- lazy val optimizingCodeGen = matchingMonadType.typeSymbol eq OptionClass | |
+ lazy val optimizingCodeGen = false // matchingMonadType.typeSymbol eq OptionClass | |
abstract class TreeMaker { | |
def substitution: Substitution = | |
@@ -1199,7 +1199,7 @@ defined class Foo */ | |
else casesUnOpt | |
val combinedCases = | |
- cases.map(combineExtractors(_, pt)).reduceLeft(pmgen.typedOrElse(optPt)) | |
+ cases.map(combineExtractors(_, pt)).reduceLeft(pmgen.typedOrElse(pt)) // optPt)) | |
toHoist = (for (treeMakers <- cases; tm <- treeMakers; hoisted <- tm.treesToHoist) yield hoisted).toList | |
@@ -1321,8 +1321,9 @@ defined class Foo */ | |
trait MatchCodeGen extends TreeMakers { | |
lazy val pmgen: CommonCodeGen with MatchingStrategyGen with MonadInstGen = | |
- if (optimizingCodeGen) (new CommonCodeGen with OptimizedCodeGen {}) | |
- else (new CommonCodeGen with MatchingStrategyGen with MonadInstGen {}) | |
+ // if (optimizingCodeGen) (new CommonCodeGen with OptimizedCodeGen {}) | |
+ // else (new CommonCodeGen with MatchingStrategyGen with MonadInstGen {}) | |
+ (new CommonCodeGen with MatchingStrategyGen with MonadInstGen {}) | |
import CODE._ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment