From 49cfd9fe87c86cd7fff0952fe379eb1e7acca611 Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Mon, 13 Oct 2014 19:04:12 +0200 Subject: 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. --- src/dotty/tools/dotc/transform/PatternMatcher.scala | 1 + 1 file changed, 1 insertion(+) (limited to 'src/dotty/tools/dotc/transform/PatternMatcher.scala') 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 -- cgit v1.2.3