Bug 12475 – extend typeof() to return '__gshared(type)'

Status
RESOLVED
Resolution
DUPLICATE
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-03-26T10:41:00Z
Last change time
2014-03-26T10:59:15Z
Assigned to
nobody
Creator
ketmar

Comments

Comment #0 by ketmar — 2014-03-26T10:41:14Z
i think that there should be either explicit trait to check if something was declared as '__gshared', or typeof() should return '__gshared(type)' as it does now for shared types. 'shared' and '__gshared' are mutually exclusive, so there should be no big harm to just extend typeof(). sample: shared int i0; typeof(i0) returns 'shared(int)' __gshared int i1; typeof(i1) returns 'int' propesed fix: typeof(i1) should return '__gshared(int)'
Comment #1 by ketmar — 2014-03-26T10:59:15Z
*** This issue has been marked as a duplicate of issue 12474 ***