We could traverse the AST after the typer phase to check for this. I don't think we have infrastructure for this, but I would like for each phase to contribute such pre/post-condition checks. Enforcement could be enabled/disabled with a compiler flag (in consideration of performance and false-positives)