aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/transform/PatternMatcher.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-11-07 22:49:21 +0100
committerMartin Odersky <odersky@gmail.com>2015-11-09 15:45:39 +0100
commitaf6ffc319cb23c5ade01251a93810f7a33429e58 (patch)
tree99dd27434fcc4fd37aeaae359ea5d0e1f9700767 /src/dotty/tools/dotc/transform/PatternMatcher.scala
parent5398c5a723b0f8b0d35e6c3ad230c5046169e837 (diff)
downloaddotty-af6ffc319cb23c5ade01251a93810f7a33429e58.tar.gz
dotty-af6ffc319cb23c5ade01251a93810f7a33429e58.tar.bz2
dotty-af6ffc319cb23c5ade01251a93810f7a33429e58.zip
Renamings in Definitions
TypeRef becomes Type, thus removing duplicates. Where ...Type was used in an extraction (e.g. ArrayType(...), FunctionType(...)), we now use ...Of.
Diffstat (limited to 'src/dotty/tools/dotc/transform/PatternMatcher.scala')
-rw-r--r--src/dotty/tools/dotc/transform/PatternMatcher.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/transform/PatternMatcher.scala b/src/dotty/tools/dotc/transform/PatternMatcher.scala
index 4b45f7cc2..5b4d42683 100644
--- a/src/dotty/tools/dotc/transform/PatternMatcher.scala
+++ b/src/dotty/tools/dotc/transform/PatternMatcher.scala
@@ -201,7 +201,7 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans
// catchAll.isEmpty iff no synthetic default case needed (the (last) user-defined case is a default)
// if the last user-defined case is a default, it will never jump to the next case; it will go immediately to matchEnd
val catchAllDef = matchFailGen.map { _(scrutSym)}
- .getOrElse(Throw(New(defn.MatchErrorTypeRef, List(ref(scrutSym)))))
+ .getOrElse(Throw(New(defn.MatchErrorType, List(ref(scrutSym)))))
val matchFail = newSynthCaseLabel(ctx.freshName("matchFail"), MethodType(Nil, restpe))
val catchAllDefBody = DefDef(matchFail, catchAllDef)
@@ -878,7 +878,7 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans
// unlike in scalac SubstOnlyTreeMakers are maintained.
val casesRebindingPropagated = casesRaw map (propagateRebindings(_, NoRebindings))
- def matchFailGen = matchFailGenOverride orElse Some((arg: Symbol) => Throw(New(defn.MatchErrorTypeRef, List(ref(arg)))))
+ def matchFailGen = matchFailGenOverride orElse Some((arg: Symbol) => Throw(New(defn.MatchErrorType, List(ref(arg)))))
ctx.debuglog("combining cases: " + (casesRebindingPropagated.map(_.mkString(" >> ")).mkString("{", "\n", "}")))