Bug 23732 – Cannot create shared instance of class with -preview=nosharedaccess

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2023-02-22T13:31:37Z
Last change time
2023-03-01T21:57:44Z
Keywords
pull, rejects-valid
Assigned to
No Owner
Creator
Atila Neves

Comments

Comment #0 by atila.neves — 2023-02-22T13:31:37Z
class Class {} void main() { auto b = new shared Class(); // Error: direct access to shared `new shared(Class)` is not allowed, see `core.atomic` }
Comment #1 by razvan.nitu1305 — 2023-02-23T13:32:49Z
Comment #2 by razvan.nitu1305 — 2023-02-23T13:38:58Z
Scratch that. This PR introduced the regression: https://github.com/dlang/dmd/pull/13970
Comment #3 by dlang-bot — 2023-02-24T11:18:08Z
@RazvanN7 created dlang/dmd pull request #14909 "Fix Issue 23732 - Cannot create shared instance of class with -preview=nosharedaccess" fixing this issue: - Fix Issue 23732 - Cannot create shared instance of class with -preview=nosharedaccess https://github.com/dlang/dmd/pull/14909
Comment #4 by dlang-bot — 2023-02-26T10:21:10Z
dlang/dmd pull request #14909 "Fix Issue 23732 - Cannot create shared instance of class with -preview=nosharedaccess" was merged into stable: - 2893a518acfe4c5c2d4f827aa6d2fe2a35370f83 by RazvanN7: Fix Issue 23732 - Cannot create shared instance of class with -preview=nosharedaccess https://github.com/dlang/dmd/pull/14909
Comment #5 by dlang-bot — 2023-03-01T21:57:44Z
dlang/dmd pull request #14938 "merge stable" was merged into master: - c129fd01ad0040556d95b8864b5ab946e3f0a018 by RazvanN7: Fix Issue 23732 - Cannot create shared instance of class with -preview=nosharedaccess https://github.com/dlang/dmd/pull/14938