https://issues.dlang.org/show_bug.cgi?id=21614
--- Comment #5 from Iain Buclaw <[email protected]> --- (In reply to Iain Buclaw from comment #4) > (In reply to Iain Buclaw from comment #2) > > In the unreduced test, a function that is marked `inferRetType` has a return > > statement, but the return type is inferred as `void` (possibly because > > semantic never finished for it). Hence the assert is triggered. > This assumption was wrong. What really happens is that there's a > constructor marked as `inferRetType`. It's body is empty so it is inferred > `void`. Then an automatic `return this` statement is appended to the body > (because it isCtorDeclaration), and an assert is triggered because the > return type is `void`. And to add insult to injury, because of a self-reference (the import statement that leads back to current module), during the semantic1 pass of `struct Tuple`, the semantic1 pass of the constructor is skipped, jumping straight to `semantic2`. --
