struct S { int a; this(int a) { } }
@safe test()
{
S s = S(1); // ctor attribute inference will let this compile
}
Comment #1 by dlang-bot — 2022-07-21T00:06:06Z
@WalterBright created dlang/dmd pull request #14319 "fix Issue 23260 - If constructors have a function body, they should i…" fixing this issue:
- fix Issue 23260 - If constructors have a function body, they should infer attributes
https://github.com/dlang/dmd/pull/14319
Comment #2 by robert.schadek — 2024-12-13T19:23:53Z