We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2731ec5 commit 8d0b817Copy full SHA for 8d0b817
compiler/src/dotty/tools/dotc/transform/TreeChecker.scala
@@ -727,7 +727,7 @@ object TreeChecker {
727
// Check that we only add the captured type `T` instead of a more complex type like `List[T]`.
728
// If we have `F[T]` with captured `F` and `T`, we should list `F` and `T` separately in the args.
729
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)
+ assert(arg.isTerm || arg.tpe.isInstanceOf[TypeRef | TermRef | ThisType], "Unexpected type arg in Hole: " + arg.tpe)
731
732
// Check result type of the hole
733
if isTerm then assert(tree1.typeOpt <:< pt)
0 commit comments