This module implements various helper routines for idioms used throughout the compiler. Dependencies on other modules should be kept as minimal as possible
Templates
template unreachable()
- Use unreachable to mark a point in the program as unreachable. That is, execution must never reach said point and if it does, the event is treated as an unrecoverable fatal error. As the intent is clearer, it's preferred to use unreachable is over doAssert false Source Edit
template unreachable(e: enum)
- More efficient than using unreachable($e) Source Edit
template unreachable(msg: string)
- Similar to #unreachable, but reports an additional msg when reached Source Edit