https://issues.dlang.org/show_bug.cgi?id=20730
Dlang Bot <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Dlang Bot <[email protected]> --- dlang/dmd pull request #11023 "fix Issue 20730 - [REG 2.091] __traits(compiles) fails if any ungagged errors occurred in compilation" was merged into stable: - e8922ef9967772e659d03e5459bbf8993902de89 by Iain Buclaw: fix Issue 20730 - [REG 2.091] __traits(compiles) fails if any ungagged errors occurred in compilation When running semantic on __traits(compiles), errors are gagged, so the saved errors count is global.gaggedErrors, and not global.errors. So the condition always evaluated as true if any real errors occured during compilation, and every subsequent __traits(compiles) errors too, whether it is valid syntax or not. https://github.com/dlang/dmd/pull/11023 --
