D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 9815 - Error on using `tupleof` with field access expression in parantheses
Summary: Error on using `tupleof` with field access expression in parantheses
Status: RESOLVED DUPLICATE of issue 9490
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2013-03-25 23:43 UTC by Denis Shelomovskii
Modified: 2020-03-21 03:56 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Denis Shelomovskii 2013-03-25 23:43:10 UTC
---
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 basile-z 2019-07-23 01:09:07 UTC

*** This issue has been marked as a duplicate of issue 9460 ***
Comment 2 Jonathan M Davis 2019-07-23 03:31:55 UTC
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 basile-z 2019-07-23 03:46:21 UTC
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 basile-z 2019-07-23 03:59:42 UTC
Yes it was actually another but I've lost it. Searches on bugzilla are aweful
Comment 5 basile-z 2019-07-23 04:02:49 UTC
It was https://issues.dlang.org/show_bug.cgi?id=9490, looks very similar right ?
Comment 6 basile-z 2019-07-23 04:03:41 UTC

*** This issue has been marked as a duplicate of issue 9490 ***