[Issue 16312] "Error: Overlapping fields" caused by use of deprecated features in referred to fields
https://issues.dlang.org/show_bug.cgi?id=16312 Iain Buclaw changed: What|Removed |Added Priority|P1 |P3 --
[Issue 16312] "Error: Overlapping fields" caused by use of deprecated features in referred to fields
https://issues.dlang.org/show_bug.cgi?id=16312 Vladimir Panteleevchanged: What|Removed |Added Hardware|x86_64 |All OS|Linux |All --
[Issue 16312] "Error: Overlapping fields" caused by use of deprecated features in referred to fields
https://issues.dlang.org/show_bug.cgi?id=16312 --- Comment #3 from Marco Leise--- I just got the overlapping fields error after a bunch of "undefined identifier" errors. So it doesn't only happen after deprecated features are used. It happens with both dmd 2.069 and 2.071.1 at least. Other compilers were not tested. --
[Issue 16312] "Error: Overlapping fields" caused by use of deprecated features in referred to fields
https://issues.dlang.org/show_bug.cgi?id=16312 Marco Leisechanged: What|Removed |Added Keywords|rejects-valid | --- Comment #2 from Marco Leise --- This report is about the first point, yes. Even if treated as an error, "deprecated" means the compiler can still handle the situation. I suggest, not to poison the AST for "deprecated as error" and "warning as error", but just print the error and continue compilation as normal. (And return -1 from main.) Does that seem feasible? --
[Issue 16312] "Error: Overlapping fields" caused by use of deprecated features in referred to fields
https://issues.dlang.org/show_bug.cgi?id=16312 Mathias Langchanged: What|Removed |Added CC||mathias.l...@sociomantic.co ||m --- Comment #1 from Mathias Lang --- 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 ? --
[Issue 16312] "Error: Overlapping fields" caused by use of deprecated features in referred to fields
https://issues.dlang.org/show_bug.cgi?id=16312 Marco Leisechanged: What|Removed |Added Severity|enhancement |minor --