[Issue 23732] New: Cannot create shared instance of class with -preview=nosharedaccess
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Feb 22 13:31:37 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23732
Issue ID: 23732
Summary: Cannot create shared instance of class with
-preview=nosharedaccess
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: major
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: atila.neves at gmail.com
class Class {}
void main() {
auto b = new shared Class(); // Error: direct access to shared `new
shared(Class)` is not allowed, see `core.atomic`
}
--
More information about the Digitalmars-d-bugs
mailing list