Skip to content

Commit 8d0b817

Browse files
Update compiler/src/dotty/tools/dotc/transform/TreeChecker.scala
Co-authored-by: Guillaume Martres <[email protected]>
1 parent 2731ec5 commit 8d0b817

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/transform/TreeChecker.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ object TreeChecker {
727727
// Check that we only add the captured type `T` instead of a more complex type like `List[T]`.
728728
// If we have `F[T]` with captured `F` and `T`, we should list `F` and `T` separately in the args.
729729
for arg <- args do
730-
assert(arg.isTerm || arg.tpe.isInstanceOf[TypeRef] || arg.tpe.isInstanceOf[TermRef] || arg.tpe.isInstanceOf[ThisType], "Expected TypeRef in Hole type args but got: " + arg.tpe)
730+
assert(arg.isTerm || arg.tpe.isInstanceOf[TypeRef | TermRef | ThisType], "Unexpected type arg in Hole: " + arg.tpe)
731731

732732
// Check result type of the hole
733733
if isTerm then assert(tree1.typeOpt <:< pt)

0 commit comments

Comments
 (0)