File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
compiler/src/dotty/tools/dotc/ast Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1181,7 +1181,9 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
11811181 /** An extractor for typed splices */
11821182 object Splice {
11831183 def apply (tree : Tree )(implicit ctx : Context ): Tree = {
1184- val argType = tree.tpe.baseType(defn.QuotedExprClass ).argTypesHi.head
1184+ val argType =
1185+ if (tree.tpe.widen.isError) tree.tpe.widen
1186+ else tree.tpe.baseType(defn.QuotedExprClass ).argTypesHi.head
11851187 ref(defn.InternalQuoted_exprSplice ).appliedToType(argType).appliedTo(tree)
11861188 }
11871189 def unapply (tree : Tree )(implicit ctx : Context ): Option [Tree ] = tree match {
Original file line number Diff line number Diff line change 1+ // import scala.quoted.matching.Bind
2+ object Test {
3+ def res (x : quoted.Expr [Int ]) given tasty .Reflection : quoted.Expr [Int ] = x match {
4+ case ' { 1 + ($ {Bind (b)}: Int ) } => ??? // error: Not found: Bind
5+ case _ => ???
6+ }
7+ }
You can’t perform that action at this time.
0 commit comments