Skip to content

Commit

Permalink
Merge pull request scala#804 from svalaskevicius/fix-compiling-ScalaR…
Browse files Browse the repository at this point in the history
…unTime

fix compiling ScalaRunTime.scala
  • Loading branch information
odersky committed Oct 2, 2015
2 parents 3ae9347 + 1c131d5 commit 5f7e290
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/dotty/tools/dotc/typer/Typer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
}

def typedAppliedTypeTree(tree: untpd.AppliedTypeTree)(implicit ctx: Context): Tree = track("typedAppliedTypeTree") {
val tpt1 = typed(tree.tpt)
val tpt1 = typed(tree.tpt)(ctx retractMode Mode.Pattern)
val tparams = tpt1.tpe.typeParams
var args = tree.args
if (tparams.isEmpty) {
Expand Down
9 changes: 9 additions & 0 deletions tests/pos/Patterns.scala
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,15 @@ object Patterns {
case t: a2.B =>
t
}

class caseWithPatternVariableHelper1[A]
class caseWithPatternVariableHelper2[A]

def caseWithPatternVariable(x: Any) = x match {
case a: caseWithPatternVariableHelper1[_] => ()
case b: caseWithPatternVariableHelper2[_] => ()
}

}

object NestedPattern {
Expand Down

0 comments on commit 5f7e290

Please sign in to comment.