rssh/dotty-cps-async

Possibly unsound unchecked casts

nicolasstucki opened this issue · 3 comments

There are a couple of casts on Expr that seem to be unsound. To check those casts use the cast method.

- term.seal.asInstanceOf[Expr[T]]
+ term.seal.cast[T]

Discovered in scala/scala3#9497

rssh commented

Thanks
will switch now.

rssh commented

Converted all, except three entries, which, I guess, show dotty bugs in type comparison.
[will submit separate bug-reports to dotty during the next possible timeslot. For now - those cast-s commented out. ]

I just saw some other .asInstanceOf[Expr[T]] that are not after a seal, those should also use cast[T]