https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94970
--- Comment #3 from Iain Buclaw <ibuclaw at gdcproject dot org> --- Somewhat simplified reduction of test that doesn't depend on operator overloading. struct RegexMatch { string index() { return null; } ~this() { } } auto m() { return RegexMatch(); } void initCommands() { auto a = m.index() ~ ' '; }