RFC: Value range propagation for if-else

bearophile via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 19 01:34:20 PDT 2014


H. S. Teoh:

> This is a different instance of the same problem as above, 
> isn't it?
> If Bound has access to compiler knowledge about value ranges, 
> then it
> would be able to statically reject out-of-range values.

Yes, with the latest patch by Kenji it's thankfully an instance 
of the same problem above, because every literal in the array 
gets used to instantiate a Bound!().

Bye,
bearophile


More information about the Digitalmars-d mailing list