Applies only to the latest DMD in git. Reduced from unittest failure in std.datetime. --- struct Bug6049 { int m; this(int x) { m = x; } invariant() { } } const Bug6049[] foo6049 = [Bug6049(6), Bug6049(17)]; static assert(foo6049[0].m == 6); ---
So, as a temporary fix to make the autotester is passing, commenting out the invariants should fix the problem?
(In reply to comment #1) > So, as a temporary fix to make the autotester is passing, commenting out the > invariants should fix the problem? Yes, but I already have a DMD pull request that fixes the problem <g>.
Then I won't worry about it :). Invariants have been a source of trouble with std.datetime though and appear to be an area in the language implementation that still has some warts. IIRC, it caused some issues with purity initially (though we can now have pure invarians fortunately), and bug# 5058 has caused definite issues as well (hence why SysTime's invariant is commented out). Well, as annoying as such bugs are, at least we're running into them so that we can fix them. Thanks for looking into this one.
https://github.com/D-Programming-Language/dmd/commit/91ffa267803aae2d639b60acfa566cf3294e66f8
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル