f.T f(){ } void main(){ }
Could you please be more explicit?
(In reply to RazvanN from comment #1) > Could you please be more explicit? Try to compile the given code. dmd crashes with a segmentation fault. It shouldn't crash, but show an error message.
There's a cycle when trying to solve T. Somewhere the ".inuse" member of the declaration of function "f" must be incremented and later decremented to detect the cycle. Just gotta find the right place, using the backtrace of the ICE, because this case is tricky. You can fix it at several place but then it breaks the test suite or even some stuff in druntime.
@Basile-z created dlang/dmd pull request #9403 "fix issue 17290 - DMD crash due to circular reference in function return type" fixing this issue: - fix issue 17290 - DMD crash due to circular reference in function return type https://github.com/dlang/dmd/pull/9403
*** Issue 17140 has been marked as a duplicate of this issue. ***
dlang/dmd pull request #9403 "fix issue 17290 - DMD crash due to circular reference in function return type" was merged into master: - e10fb38ed81aa27fe688cef0c36f8cc3da2948dc by Basile Burg: fix issue 17290 - DMD crash due to circular reference in function return type https://github.com/dlang/dmd/pull/9403
dlang/dmd pull request #10046 "[dmd-cxx] Backport semanticRun refactoring and recursive semantic SEGV bug fixes" was merged into dmd-cxx: - d7dc83daead6b5ac8413e55fc3cff706ead7da18 by Basile Burg: fix issue 17290 - DMD crash due to circular reference in function return type https://github.com/dlang/dmd/pull/10046