Comment #0 by dlang-bugzilla — 2020-04-20T04:18:30Z
//////////////// test.d ////////////////
struct HashCollection()
{
struct Item
{
IniFragment value;
}
Item[] items;
ref lookupToReturnValue()
{
return items[0].value;
}
enum canDup = is(typeof(items.dup));
}
struct IniFragment
{
HashCollection!() children;
}
////////////////////////////////////////
Works in DMD 2.085 but not newer.
Bisecting shows that the error message begins manifesting when it was introduced ( https://github.com/dlang/dmd/pull/9425 ), however debug versions of DMD have been failing with an assertion failure before that change. The assertion failures began after https://github.com/dlang/dmd/pull/5500 .
(In reply to Iain Buclaw from comment #1)
> How are you building dmd? I first tried a debug version of v2.085.1, and I
> hit an assert on the test.
>
Ah, I failed to read the last sentence. So the regression is in fact caused by pr5500, and pr9485 only partially solved the problem by no longer ICE'ing.
Comment #3 by razvan.nitu1305 — 2021-11-26T12:29:42Z
Running the code on run.dlang.io [1], it seems that at some point this code compiled, but then it issued an error which was transformed into an ICE. So by "Works in DMD 2.085 but not newer.", I guess you mean that a proper error is outputted? I can't imagine how this used to work we have a mutual dependency at semantic between HashCollection and IniFragment.
[1] https://github.com/dlang/dmd/pull/13348#issuecomment-979940003
Comment #4 by razvan.nitu1305 — 2021-11-26T12:30:23Z
(In reply to RazvanN from comment #3)
> Running the code on run.dlang.io [1], it seems that at some point this code
> compiled, but then it issued an error which was transformed into an ICE. So
> by "Works in DMD 2.085 but not newer.", I guess you mean that a proper error
> is outputted? I can't imagine how this used to work we have a mutual
> dependency at semantic between HashCollection and IniFragment.
>
> [1] https://github.com/dlang/dmd/pull/13348#issuecomment-979940003
I'm sorry, but I messed up the link. The proper link is: https://run.dlang.io/is/2qlZvz
Comment #5 by dlang-bugzilla — 2021-11-26T12:36:12Z
(In reply to RazvanN from comment #3)
> Running the code on run.dlang.io [1], it seems that at some point this code
> compiled, but then it issued an error which was transformed into an ICE. So
> by "Works in DMD 2.085 but not newer.", I guess you mean that a proper error
> is outputted? I can't imagine how this used to work we have a mutual
> dependency at semantic between HashCollection and IniFragment.
By "works" here I meant "does not crash with -o-", but it does result in various errors with -c.
With -c, it succeeds in the version range 2.066.0 to 2.071.2.
Comment #6 by robert.schadek — 2024-12-13T19:08:14Z