Tell me more ×  Or more generally: to trigger compiler errors in
test projects if something that can be checked at compile time
is wrong?  share|improve this question as an approach that
shortens time between introducing the bug and discovering it,
this looks like worth encouraging –  gnat Jan 16 at 12:47 Any
time you can turn a runtime exception into a compile time
exception is a win - I don't usually make sweeping statements
but I can't think of an exceptions to that principle.. – 
MattDavey Jan 16 at 12:56 @MattDavey - here's one: If it makes
the code harder to work on, then the compile time exception
isn't worth it. Doesn't come up often, but there are times where
trying to make something assertable at compile time makes it
much harder to work with. –  Michael Kohne Jan 16 at 13:03
@MichaelKohne absolutely, that's a valid point. It's hard to
know where the threshold is where a compile-time exception would
become unjustifiable.. –  MattDavey Jan 16 at 13:52 To add to
that - just make sure the compilation e