summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2012-05-24 11:00:28 +0200
committerAdriaan Moors <adriaan.moors@epfl.ch>2012-05-25 12:11:00 +0200
commitaee338da477bbe6e059f8ed3ae231e5e51128d93 (patch)
treef68a566d6e7ac411e8609a84debf1258ee04daad /src
parent032e8ae857f84322d90c90479d989bee2cf6a53d (diff)
downloadscala-aee338da477bbe6e059f8ed3ae231e5e51128d93.tar.gz
scala-aee338da477bbe6e059f8ed3ae231e5e51128d93.tar.bz2
scala-aee338da477bbe6e059f8ed3ae231e5e51128d93.zip
don't error when not emitting required switch
we don't handle switches with guards, whereas the old patmat did to ease the transition, let's not error out and see how we can resolve this
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala b/src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala
index 80d40011ad..4d66fb5617 100644
--- a/src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala
@@ -1105,7 +1105,7 @@ trait PatternMatching extends Transform with TypingTransformers with ast.TreeDSL
}
emitSwitch(scrut, scrutSym, casesNoSubstOnly, pt, matchFailGenOverride).getOrElse{
- if (requireSwitch) typer.context.unit.error(scrut.pos, "could not emit switch for @switch annotated match")
+ if (requireSwitch) typer.context.unit.warning(scrut.pos, "could not emit switch for @switch annotated match")
if (casesNoSubstOnly nonEmpty) {
// before optimizing, check casesNoSubstOnly for presence of a default case,