Bug 9815 – Error on using `tupleof` with field access expression in parantheses
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-03-25T23:43:10Z
Last change time
2020-03-21T03:56:31Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
Denis Shelomovskii
Comments
Comment #0 by verylonglogin.reg — 2013-03-25T23:43:10Z
---
struct S { int i; }
struct S1 { S s; }
void f(int) { }
void main()
{
S1 s1;
f(s1.s.tupleof); // OK
f((s1.s).tupleof); // Error: need 'this' to access member s
}
---
Comment #1 by b2.temp — 2019-07-23T01:09:07Z
*** This issue has been marked as a duplicate of issue 9460 ***
Comment #2 by issues.dlang — 2019-07-23T03:31:55Z
Issue # 9460 relates to using stringof on templated classes. This bug doesn't seem to have anything to do with that. So, if this a duplicate of another bug, it's a bug other than issue # 9460.
Comment #3 by b2.temp — 2019-07-23T03:46:21Z
It's the same problem with parens, whatever is the DotVarExp/DorIdExp, they are solved at the same place and the parens cause the same issue. So this Happens when Id == Id.tupleof, Id == Id.stringof, Id.length etc. All of them.
Comment #4 by b2.temp — 2019-07-23T03:59:42Z
Yes it was actually another but I've lost it. Searches on bugzilla are aweful