import std.stdio; void main() { writeln("Hello world!"); Compilation of the above with -preview=nosharedaccess fails. The three error messages, one each for stdin, stdout and stderr, look like this: /dlang/dmd/linux/bin64/../../src/phobos/std/stdio.d-mixin-4841(4841): Error: direct access to shared stdin is not allowed, see core.atomic In the current stdio.d, the offending mixin is at line 4858 within the property template named "makeGlobal". The fix may be as simple as a cast at that location.
main() needs a closing brace.
@atilaneves created dlang/phobos pull request #8562 "Fix issue 21000 - allow use of std{in,out,err} with -preview=noshared…" fixing this issue: - Fix issue 21000 - allow use of std{in,out,err} with -preview=nosharedaccess https://github.com/dlang/phobos/pull/8562
dlang/phobos pull request #8562 "Fix issue 21000 - allow use of std{in,out,err} with -preview=noshared…" was merged into master: - 03ac553e03d2c018c7e4b050c4cb4e893bdf79dc by Atila Neves: Fix issue 21000 - allow use of std{in,out,err} with -preview=nosharedaccess https://github.com/dlang/phobos/pull/8562