You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we had a reference to a `x.type` we mistakenly captured `x` instead
of `x.type`. This was caused because `SingletonTypeTree` was not handled
in `Splicing`. Fixing this uncovered some inconsistencies with the types
in the encoding of the hole captured types and contents. These have been
fixed as well.
Copy file name to clipboardExpand all lines: compiler/src/dotty/tools/dotc/transform/TreeChecker.scala
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -658,7 +658,7 @@ object TreeChecker {
658
658
// Check that we only add the captured type `T` instead of a more complex type like `List[T]`.
659
659
// If we have `F[T]` with captured `F` and `T`, we should list `F` and `T` separately in the args.
660
660
for arg <- args do
661
-
assert(arg.isTerm || arg.tpe.isInstanceOf[TypeRef], "Expected TypeRef in Hole type args but got: "+ arg.tpe)
661
+
assert(arg.isTerm || arg.tpe.isInstanceOf[TypeRef]|| arg.tpe.isInstanceOf[TermRef], "Expected TypeRef or TermRef in Hole type args but got: "+ arg.tpe)
0 commit comments