https://issues.dlang.org/show_bug.cgi?id=16312
Mathias Lang <mathias.l...@sociomantic.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mathias.l...@sociomantic.co | |m --- Comment #1 from Mathias Lang <mathias.l...@sociomantic.com> --- Note: Only when compiled with `-de`. They are two things at play here: - First, when the compiler encounter an error, it 'poison' the AST node. That can lead to wrong error messages in places not adjusted to deal with the poisoning. - Second, the compiler treat a non-fatal error (e.g. a warning when `-w` is provided or a deprecation when `-de` is provided) as a fatal one. This can have extremely dangerous consequences, e.g. the following will still compiles, just have different behaviour: ``` class Deprecated { int j; this (T) (T i) { this.j = (i, T.init); } } template Foo (T) if (__traits(compiles, { T a = new T(42); })) { enum Foo = "First instance"; } template Foo (T) if (!__traits(compiles, { T a = new T(42); })) { enum Foo = "Second instance"; } pragma(msg, Foo!(Deprecated)); ``` The second bug is well known, so I suppose this ER is about the first point ? --