The test case below generates many spurious error messages. In the beta of 2.047, they have references to type _error. Now that there is a distinct error type, it is straightforward to eliminate them all. Most occur in expression.c. For example, all the checkXXX() functions should start with: if (type == Type::terror) return new ErrorExp(); Likewise cases such as: void BinExp::incompatibleTypes() { + if (e1->type == Type::terror || e2->type == Type::terror) + return; -------------- TEST CASES -------------- void error_message_tests() { int x = y * 1; x = 4 + y; int *p = *y; x = y++; x = 7 - y; x = y[3]; x = ++y; x = y ? 2 : 3; x = null[y]; x = p[y..y]; y += y; x = y/1; // and where the heck did those two divs by 0 come from???? x = y ~ y; x ~= y; x = !y; x = 3 in y; x = y is 2; x = y ^^ 2; x ^^= y; }
http://www.dsource.org/projects/dmd/changeset/528