[Issue 20068] Union initialization in constructors should be @safe

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Apr 7 23:58:49 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=20068

Dlang Bot <dlang-bot at dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/dmd pull request #12400 "Fix 20068 - Treat initialization of unions in
constructors as @safe" was merged into master:

- fafefbc93f212d471b2cacf0208772e9a8d18286 by MoonlightSentinel:
  Fix 20068 - Treat initialization of unions in constructors as @safe

  Don't eagerly check the safety of a `DotVarExp` when determining
  whether it's modifiable and instead defer it after the `ConstructExp`
  lowerings.

  This also ensures proper error messages when initializing an immutable
  member twice.

https://github.com/dlang/dmd/pull/12400

--


More information about the Digitalmars-d-bugs mailing list