https://issues.dlang.org/show_bug.cgi?id=22865
Basile-z <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |safe CC| |[email protected] --- Comment #1 from Basile-z <[email protected]> --- patch --- diff --git a/src/dmd/expressionsem.d b/src/dmd/expressionsem.d index 6eda68880..0c060fd0d 100644 --- a/src/dmd/expressionsem.d +++ b/src/dmd/expressionsem.d @@ -7629,6 +7629,8 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor // Check for unsafe casts if (!sc.intypeof && + !(sc.flags & SCOPE.compile && sc.flags & SCOPE.ctfe) && !(sc.flags & SCOPE.debug_) && !isSafeCast(ex, t1b, tob) && (!sc.func && sc.stc & STC.safe || sc.func && sc.func.setUnsafe())) --- --
