https://issues.dlang.org/show_bug.cgi?id=23255
--- Comment #5 from Iain Buclaw <[email protected]> --- (In reply to kinke from comment #4) > (In reply to Iain Buclaw from comment #2) > > Looks like mixing of release and non-release causes this. > > > > foo-release -> does not generate __switch_error. > > > > test-non-release -> generates __switch_error, but assumes that `foo` will > > too, so elides the emission. This results in the undefined reference. > > > > Confirmed that in 2.098, test-non-release always emits __switch_error. > > Makes perfect sense, and is accordingly no regression, just a missed case of > culling which is now properly culled. Linking code compiled with different > flags affecting template codegen is a well-known issue, and `-allinst` is > supposed to handle that, but isn't enough in all cases (which are real bugs, > either regarding template emission or inconsistent attributes inference). Or perhaps when importing modules across (multiple) DSO boundaries, only expose .di interface files between them. --
