[Issue 20195] -preview=nosharedaccess has some access problems

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Sep 18 10:57:04 UTC 2020


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

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

--- Comment #8 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/dmd pull request #11726 "Fix 20195 - Improve `shared` access detection"
was merged into master:

- 0257cec542a1fc17ba02b58a22337297463d69df by Geod24:
  Fix 20195 - 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`.



More information about the Digitalmars-d-bugs mailing list