diff options
Diffstat (limited to 'src/dotty/tools/dotc/transform/PatternMatcher.scala')
-rw-r--r-- | src/dotty/tools/dotc/transform/PatternMatcher.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/transform/PatternMatcher.scala b/src/dotty/tools/dotc/transform/PatternMatcher.scala index 2df7a9825..a47762ebe 100644 --- a/src/dotty/tools/dotc/transform/PatternMatcher.scala +++ b/src/dotty/tools/dotc/transform/PatternMatcher.scala @@ -134,7 +134,7 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans // for name-based matching, but this was an expedient route for the basics. def drop(tgt: Tree)(n: Int): Tree = { def callDirect = tgt.select(nme.drop).appliedTo(Literal(Constant(n))) - def callRuntime = ref(defn.traversableDropMethod).appliedTo(tgt, Literal(Constant(n))) + def callRuntime = ref(defn.ScalaRuntime_drop).appliedTo(tgt, Literal(Constant(n))) def needsRuntime = !(tgt.tpe derivesFrom defn.SeqClass) /*typeOfMemberNamedDrop(tgt.tpe) == NoType*/ @@ -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.MatchErrorType, List(ref(scrutSym))))) + .getOrElse(Throw(New(defn.MatchErrorTypeRef, 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.MatchErrorType, List(ref(arg))))) + def matchFailGen = matchFailGenOverride orElse Some((arg: Symbol) => Throw(New(defn.MatchErrorTypeRef, List(ref(arg))))) ctx.debuglog("combining cases: " + (casesRebindingPropagated.map(_.mkString(" >> ")).mkString("{", "\n", "}"))) |