RFC: Value range propagation for if-else

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


> void main() {
>     import std.bigint;
>     BigInt[] arr = [10, 20];
>
>     import std.numeric;
>     alias I10 = Bound!(int, 0, 10);
>     I10[] arr = [8, 6, 20];
> }

In the meantime Kenji delivers, those BigInt array literals are 
possible with this patch:
https://github.com/D-Programming-Language/dmd/pull/3680

Bye,
bearophile


More information about the Digitalmars-d mailing list