aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/transform/PatternMatcher.scala
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2014-10-13 19:04:12 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-10-13 19:04:12 +0200
commit49cfd9fe87c86cd7fff0952fe379eb1e7acca611 (patch)
tree2a57ab79818b63b7a88c2e03ad919f891ce0a610 /src/dotty/tools/dotc/transform/PatternMatcher.scala
parent5454bca536863a7db1d0b4a848697f33c5c8bded (diff)
downloaddotty-49cfd9fe87c86cd7fff0952fe379eb1e7acca611.tar.gz
dotty-49cfd9fe87c86cd7fff0952fe379eb1e7acca611.tar.bz2
dotty-49cfd9fe87c86cd7fff0952fe379eb1e7acca611.zip
Quickfix patmat not handling Bind(_, Typed(_: Unapply))
Typer creates a tree that given current decoding scheme means case a @ (Assign(Ident(id), rhs) : tpt) Which isn't valid scala.
Diffstat (limited to 'src/dotty/tools/dotc/transform/PatternMatcher.scala')
-rw-r--r--src/dotty/tools/dotc/transform/PatternMatcher.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/transform/PatternMatcher.scala b/src/dotty/tools/dotc/transform/PatternMatcher.scala
index de2503b6a..ac92bb80c 100644
--- a/src/dotty/tools/dotc/transform/PatternMatcher.scala
+++ b/src/dotty/tools/dotc/transform/PatternMatcher.scala
@@ -979,6 +979,7 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans
object SymbolAndTypeBound {
def unapply(tree: Tree): Option[(Symbol, Type)] = tree match {
+ case SymbolBound(sym, Typed(_: UnApply, _)) => None // see comment in #189
case SymbolBound(sym, TypeBound(tpe)) => Some(sym -> tpe)
case TypeBound(tpe) => Some(binder -> tpe)
case _ => None