Bug 23095 – taggedPointer accessors are not scope

Status
NEW
Severity
minor
Priority
P3
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2022-05-05T21:33:54Z
Last change time
2024-12-01T16:40:04Z
Assigned to
No Owner
Creator
Gabriel B. Sant'Anna
Moved to GitHub: phobos#9840 →

Comments

Comment #0 by baiocchi.gabriel — 2022-05-05T21:33:54Z
taggedPointer generates @property accessors for every separate part of the tagged pointer. However, these don't work on a scope reference when compiling with -dip1000: import std.bitmanip : taggedPointer; struct S { mixin(taggedPointer!( int*, "ptr", bool, "flag", 1 )); } void foo(scope ref S s) @safe { s.flag; // <- error points here } // Error: scope variable `s` assigned to non-scope parameter `this` calling test.S.flag
Comment #1 by robert.schadek — 2024-12-01T16:40:04Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/9840 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB