Skip to content

Commit

Permalink
Avoid error on TypeApply with Inline or Hole prefix
Browse files Browse the repository at this point in the history
These are valid prefixes for a TypeApply in the same way they are for an
Apply.

See scala#16861 (comment)
  • Loading branch information
nicolasstucki committed Oct 16, 2023
1 parent 231ca72 commit 5ac60bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/ast/tpd.scala
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
def TypeApply(fn: Tree, args: List[Tree])(using Context): TypeApply = fn match
case Block(Nil, expr) =>
TypeApply(expr, args)
case _: RefTree | _: GenericApply =>
case _: RefTree | _: GenericApply | _: Inlined | _: Hole =>
ta.assignType(untpd.TypeApply(fn, args), fn, args)
case _ =>
assert(ctx.reporter.errorsReported)
Expand Down

0 comments on commit 5ac60bb

Please sign in to comment.