diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-10-13 19:04:12 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-10-13 19:04:12 +0200 |
commit | 49cfd9fe87c86cd7fff0952fe379eb1e7acca611 (patch) | |
tree | 2a57ab79818b63b7a88c2e03ad919f891ce0a610 /src/dotty/tools/dotc/transform/PatternMatcher.scala | |
parent | 5454bca536863a7db1d0b4a848697f33c5c8bded (diff) | |
download | dotty-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.scala | 1 |
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 |