D-Programming-Language/dmd — pull request #3799 by yebblies (2014-07-22 13:49:40+00:00)
Title: Issue 13185 - Detect precondition violations at compile time when possible

Implement compile-time contract checks for preconditions with the following limitations:
- Precondition contains only a single assert
- Parameters are value types or immutable
- Arguments are constant expressions
- Assert condition consists of only integer constants, parameters and comparisons

https://issues.dlang.org/show_bug.cgi?id=13185