Closed
Description
Sometimes //~ ERROR
attached to a line in the local file cannot be used for testing an error message, because the message is attached to a "remote" span from some other file.
In this case error-pattern
annotations can be used in compile-fail tests to check that some diagnostics present in the output regardless of span.
The problem is that such annotations are completely ignored in UI tests and don't check anything, so every such annotation is a potential bug going unnoticed.
error-pattern
should either work in UI tests, or some #52175 -like mechanism should be used to remap remote spans into local spans and then //~ ERROR
could be used for everything.