Closed
Description
The code in compiletest which scans for expected errors when you use the //!
mechanism to associate an error with a particular line is not very smart. It just looks for a filename, line number, and the string error
or warning
. This sometimes causes it to fail tests that do not deserve to fail. For example, if you have a line of code like:
log(error, x); //! ERROR some expected error
and the compiler reports the expected error, you will get a test failure. This is because the compiler also reports the line of code that caused the error, and the compiletest code sees the error
string in log(error, x)
and thinks that this line of code is a second error report which was not expected.