We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6608c9 commit 35637c1Copy full SHA for 35637c1
1 file changed
std/uni/package.d
@@ -1785,7 +1785,9 @@ alias sharSwitchLowerBound = sharMethod!switchUniformLowerBound;
1785
{
1786
debug
1787
1788
- arr[] = cast(typeof(T.init[0]))(0xdead_beef);
+ import core.memory : GC;
1789
+ if (!__ctfe && !GC.inFinalizer) // only do this if we are not in the GC finalizer
1790
+ arr[] = cast(typeof(T.init[0]))(0xdead_beef);
1791
}
1792
arr = null;
1793
0 commit comments