dmd 1.046 and 2.031 releases

MIURA Masahiro echochamber at gmail.com
Mon Jul 6 00:30:25 PDT 2009


Thanks for the new release!  Are case ranges limited to 256 cases?

% cat -n foo.d
     1  import std.conv;
     2  import std.stdio;
     3
     4  void main(string[] args)
     5  {
     6      int i = to!int(args[0]);
     7
     8      switch (i) {
     9      case int.min: .. case -1:   // line 9
    10          writefln("negative");
    11          break;
    12      case 0:
    13          writefln("zero");
    14          break;
    15      default:
    16          writefln("positive");
    17          break;
    18      }
    19  }
% dmd foo.d
foo.d(9): Error: more than 256 cases in case range
%


More information about the Digitalmars-d-announce mailing list