Introduced by: https://github.com/dlang/dmd/pull/6065 Reduced: --- struct DSO { inout(ModuleGroup) moduleGroup() { } } struct ThreadDSO { DSO* _pdso; void[] _tlsRange; } --- Causes assertion failure: ``` sections.d(3): Error: undefined identifier 'ModuleGroup', did you mean function 'moduleGroup'? sections.d(3): Error: inout on return means inout must be on a parameter as well for inout(ModuleGroup)() core.exception.AssertError@declaration.d(2121): Assertion failure ---------------- ??:? _d_assert [0x705b70] ??:? void ddmd.declaration.__assert(int) [0x52b962] ??:? bool VarDeclaration::isOverlappedWith(VarDeclaration*) [0x52a0f5] ??:? bool AggregateDeclaration::checkOverlappedFields() [0x4f71c8] ??:? void StructDeclaration::finalizeSize() [0x55366e] ??:? bool AggregateDeclaration::determineSize(Loc) [0x4f6fb9] ??:? void AggregateDeclaration::semantic2(Scope*) [0x4f6995] ??:? void Module::semantic2(Scope*) [0x54899d] ??:? int ddmd.mars.tryMain(ulong, const(char)**) [0x5cf4b4] ??:? _Dmain [0x5d0222] ??:? _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x707a17] ??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x707943] ??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() [0x7079bc] ??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x707943] ??:? _d_run_main [0x7078a7] ??:? main [0x5d09c3] ??:? __libc_start_main [0xd137882f] ```
https://github.com/dlang/dmd/pull/6690
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/3a24d037f5d38bd7e751636e5a3adb73211c966e fix Issue 17275 - [REG 2.072.0] AssertError@declaration.d(2121): Assertion failure https://github.com/dlang/dmd/commit/15b3ee1603b7dcc0317ba63c54f77ee9718f90e4 Merge pull request #6690 from WalterBright/fix17275 fix Issue 17275 - [REG 2.072.0] AssertError@declaration.d(2121): Asse…
This is not fixed. --- $ ./src/dmd test/fail_compilation/fail17275.d test/fail_compilation/fail17275.d(5): Error: undefined identifier 'ModuleGroup', did you mean function 'moduleGroup'? test/fail_compilation/fail17275.d(5): Error: inout on return means inout must be on a parameter as well for inout(ModuleGroup)() core.exception.AssertError@ddmd/argtypes.d(201): Assertion failure ---------------- ??:? _d_assert [0x72bdb4] ??:? void ddmd.argtypes.__assert(int) [0x510ff2] ??:? Type* toArgTypes::ToArgTypes::argtypemerge(Type*, Type*, unsigned int) [0x5106ce] ??:? void toArgTypes::ToArgTypes::visit(TypeStruct*) [0x510dae] ??:? void TypeStruct::accept(Visitor*) [0x5f3830] ??:? TypeTuple* toArgTypes(Type*) [0x5102b9] ??:? void StructDeclaration::finalizeSize() [0x56b414] ??:? bool AggregateDeclaration::determineSize(Loc) [0x50e659] ??:? void AggregateDeclaration::semantic2(Scope*) [0x50dff5] ??:? void Module::semantic2(Scope*) [0x56067d] ??:? int ddmd.mars.tryMain(ulong, const(char)**) [0x5dfa4b] ??:? _Dmain [0x5e09b2] ??:? _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x72dc5b] ??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x72db87] ??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() [0x72dc00] ??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x72db87] ??:? _d_run_main [0x72daeb] ??:? main [0x5e1153] ??:? __libc_start_main [0xb2a6282f]
https://github.com/dlang/dmd/pull/6845
https://github.com/dlang/dmd/pull/6875
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/d46fcde6214ab49cefc0c3ed2e24059f356dd429 fix Issue 17275 - [REG 2.072.0] AssertError@declaration.d(2121): Assertion failure https://github.com/dlang/dmd/commit/cb61805ebf04b7e27e18ca5ad98fae39d8a9a2f6 Merge pull request #6875 from WalterBright/fix17275-2 fix Issue 17275 - [REG 2.072.0] AssertError@declaration.d(2121): Asse… merged-on-behalf-of: Walter Bright <WalterBright@users.noreply.github.com>
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/3a24d037f5d38bd7e751636e5a3adb73211c966e fix Issue 17275 - [REG 2.072.0] AssertError@declaration.d(2121): Assertion failure https://github.com/dlang/dmd/commit/15b3ee1603b7dcc0317ba63c54f77ee9718f90e4 Merge pull request #6690 from WalterBright/fix17275 https://github.com/dlang/dmd/commit/d46fcde6214ab49cefc0c3ed2e24059f356dd429 fix Issue 17275 - [REG 2.072.0] AssertError@declaration.d(2121): Assertion failure https://github.com/dlang/dmd/commit/cb61805ebf04b7e27e18ca5ad98fae39d8a9a2f6 Merge pull request #6875 from WalterBright/fix17275-2
Commits pushed to newCTFE at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/3a24d037f5d38bd7e751636e5a3adb73211c966e fix Issue 17275 - [REG 2.072.0] AssertError@declaration.d(2121): Assertion failure https://github.com/dlang/dmd/commit/15b3ee1603b7dcc0317ba63c54f77ee9718f90e4 Merge pull request #6690 from WalterBright/fix17275 https://github.com/dlang/dmd/commit/d46fcde6214ab49cefc0c3ed2e24059f356dd429 fix Issue 17275 - [REG 2.072.0] AssertError@declaration.d(2121): Assertion failure https://github.com/dlang/dmd/commit/cb61805ebf04b7e27e18ca5ad98fae39d8a9a2f6 Merge pull request #6875 from WalterBright/fix17275-2