https://issues.dlang.org/show_bug.cgi?id=17548
--- Comment #5 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/8a67b112405213d95089426b8ecfc598ee14d3fb Fix Issue 17548 - [REG2.072.0] Forward reference error with scope function parameters Prior to this commit, in StructDeclaration.semantic the only two ways the condition (symtab && !scx && semanticRun < PASSsemanticdone) may be true are: - if determineFields() fails - if a first semantic() call on the same struct is ongoing But in the second case, setting semanticRun to PASSsemanticdone is wrong, because if the semantic() call defers itself, the deferred semantic() call will return immediately, resulting in a "has forward references" error during semantic2(). https://github.com/dlang/dmd/commit/b61d20fdbda633d7dfcf18f1b81649f25e32d0c4 Add testcase for issue 17548. https://issues.dlang.org/show_bug.cgi?id=17548 https://github.com/dlang/dmd/commit/2f6db2fb8bef57e55a45fc555128bd9d9fbf328e Merge pull request #6937 from Syniurge/alt-fix17548 Alternative fix to issue 17548 - [REG2.072.0] Forward reference error with scope function parameters merged-on-behalf-of: Martin Nowak <c...@dawg.eu> --