problem while updating to 2.052
Christian Köstlin
christian.koestlin at gmail.com
Sat Feb 19 12:30:28 PST 2011
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
More information about the Digitalmars-d-learn
mailing list