Skip to content

Commit 49cfd9f

Browse files
committed
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.
1 parent 5454bca commit 49cfd9f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/dotty/tools/dotc/transform/PatternMatcher.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -979,6 +979,7 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans
979979

980980
object SymbolAndTypeBound {
981981
def unapply(tree: Tree): Option[(Symbol, Type)] = tree match {
982+
case SymbolBound(sym, Typed(_: UnApply, _)) => None // see comment in #189
982983
case SymbolBound(sym, TypeBound(tpe)) => Some(sym -> tpe)
983984
case TypeBound(tpe) => Some(binder -> tpe)
984985
case _ => None

0 commit comments

Comments
 (0)