Allow for Compile-Time Checked Intervals for Parameters Expecting Literal Values

Better validation at compile time would benefit many types, not just those expressible by integer literals. The groundwork is being laid for this with compile-time constant expressions.

Once built out, one imagines that a @compilerEvaluable precondition would get you the diagnostics you want.

See also:

13 Likes