https://issues.dlang.org/show_bug.cgi?id=23255
kinke <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #4 from kinke <[email protected]> --- (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). --
