New with DMD 1.009. This gives the error : struct overlapbug.Z overlapping initialization for struct Z.bar struct Z { int bar=1; union { FooT foo; } } struct FooT{ size_t offset=0;} But it works if you move "int bar=1" after the union. And it also works if you move the declaration of FooT before Z. Also this is one of those error messages that lacks an "Error" prefix in the message.
Do you feel that every error message should have an "Error" prefix? Any particular reason? Personally, I think they're just as good or better without it. Moreover, even if we do have it, it should be part of the error output mechanism itself rather than of each error message. Making it so would be an enhancement request, separate from this bug.
(In reply to comment #1) > Do you feel that every error message should have an "Error" prefix? Any > particular reason? There at least needs to be some easily greppable way to distinguish between the first line of an error and the continuation lines. One easy way to do that is to prefix every error with a sigil like "Error" "Warning" or "Information". This makes it possible for IDEs to automatically take you to errors in your source code and the lines they are on. And if they're all prefixed with "Error" vs "SomethingElse" then the IDE can also easily prioritize them so that it takes you to errors first and Warnings etc later (or never).
(In reply to comment #2) > This makes it possible for IDEs to automatically take you to errors > in your source code and the lines they are on. TextPad manages without it. What's more, if only all filename/lineno references relevant to a single error are at the beginning of their lines, then it can pinpoint all these lines - whereas if it relied on seeing the word "Error", it probably wouldn't. But it took me a while to get it to work on warning messages, with their peculiar format. I recall that I managed to do it in the end but seem to have lost the regexp to do it. > And if they're all prefixed with "Error" vs "SomethingElse" then > the IDE can also easily prioritize them so that it takes you to > errors first and Warnings etc later (or never). Good point. But still, it would depend on the IDE whether it makes any real difference.
Added to DStress as http://dstress.kuehne.cn/run/f/forward_reference_20_A.d http://dstress.kuehne.cn/run/f/forward_reference_20_B.d http://dstress.kuehne.cn/run/f/forward_reference_20_C.d http://dstress.kuehne.cn/run/f/forward_reference_20_D.d
although #945 seems completely unrelated, the patch there also fixes this issue including the dstress-tests.
changeset 478
Fixed DMD1.061 and DMD2.046.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル