dotty-feature-requests
dotty-feature-requests copied to clipboard
Return Error in `compiletime.testing.typeChecks`
First, thank you for adding scala.compiletime.testing.typeChecks
! In a statistically typed language it is nice to be able to verify that specified code does not compile and to have this as part of the standard library.
What would be even nicer would be to get back some kind of error type, either a String or a small algebraic data type, describing why the code did not compile. Without this it can be fairly easy to write code that doesn't compile for other than the intended reason (e.g. because of a typo), undermining the confidence that features designed to add type safety are actually working as intended.
Thanks for your consideration!