[Issue 20908] -preview=nosharedaccess requires zero-initializion for aggregates

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Sep 13 19:45:08 UTC 2020


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #1 from Dlang Bot <dlang-bot at dlang.rocks> ---
@Geod24 created dlang/dmd pull request #11726 "Fix 20908 - Improve `shared`
access detection" fixing this issue:

- Fix 20908 - Improve `shared` access detection

  There were quite a few positives with the previous approach.
  Essentially, we cannot perform it during expression semantic,
  within things like `visit(PtrExp)` methods, because we need
  to be aware of our context.

  Instead of adding yet another flag to `Scope` (which would need
  to be flipped on and off), we use a visitor called from a higher
  level (namely, the unary / binary expression semantic).

  This should also make it easier to extend in the future,
  for example by adding support for bypassing the check if
  the constructor is `pure`.

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

--


More information about the Digitalmars-d-bugs mailing list