Suppose I'm writing a library in a statically typed language. I want to ensure that certain types of mistakes cause type errors, so my users are protected from the mistakes. I'd like tests (or something) that ensure that those mistakes cause type errors. How do I do it?
-
Show this thread
-
This is in the context of TypeScript. I'd rather not build all of the infrastructure to invoke the compiler and assert that it emits a certain error.
13 replies 0 retweets 15 likesShow this thread -
-
Replying to @steveklabnik @garybernhardt
really? like there's no internal API that takes a crate and returns a list of type errors?
2 replies 0 retweets 0 likes -
Replying to @mountain_ghosts @garybernhardt
too many compiler guts to make stable
2 replies 0 retweets 0 likes
The compiletest infrastructure is really nice tho; ends up being very useful when writing macros in userland!
1:57 PM - 21 May 2019
from Berlin, Germany
0 replies
0 retweets
2 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.