hi .. i have a small library for combinatorial parsing.
when i updated to version 2.052 of dmd (tested on os x) i got an exception from variant.d:279 (target must be non-null).
i fixed the problem with the following diff:
     ParseResult!(T) parse(T[] s) {
-      auto results = appender!(Variant[])();
+      Variant[] results;
       auto rest = s;
       while (true) {
         auto res = fToRepeat.parse(rest);
         if (res.success) {
           rest = res.rest;
-          results.put(res.results);
+          results = results ~ res.results;
         } else {
           break;
         }
       }
-      return transform(ParseResult!(T).ok(rest, results.data));
+      return transform(ParseResult!(T).ok(rest, results));
     }

what did i do wrong and why could it work with an older version of dmd2?

thanks in advance

christian koestlin

Reply via email to