Bug 7935 – Struct-by-pointer field access in TypeTuple
Status
RESOLVED
Resolution
WORKSFORME
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2012-04-17T14:43:00Z
Last change time
2015-05-19T01:02:52Z
Keywords
diagnostic
Assigned to
nobody
Creator
bearophile_hugs
Comments
Comment #0 by bearophile_hugs — 2012-04-17T14:43:43Z
This is wrong D2 code:
import std.typecons: TypeTuple;
struct Node {
Node* left, right;
}
void main() {
Node* n = new Node();
auto le = n.left;
auto t = TypeTuple!(n.left);
}
DMD 2.059 gives this error message, but I think it's better to give a different error message:
test.d(8): Error: no property 'left' for type 'Node*'
Comment #1 by dlang-bugzilla — 2015-05-19T01:02:52Z