D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3838 - PrimaryExpression rule doesn't permit module scope template instances
Summary: PrimaryExpression rule doesn't permit module scope template instances
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dlang.org (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL: http://digitalmars.com/d/2.0/expressi...
Keywords: spec
Depends on:
Blocks:
 
Reported: 2010-02-18 16:51 UTC by Jerry Quinn
Modified: 2015-06-09 01:27 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 Jerry Quinn 2010-02-18 16:51:22 UTC
The PrimaryExpression rule allows module scope identifiers and types but not template instances.  Dmd 2.040 allows them, though.  So:

struct ss(S) {
  static S s;
}
void foo() {
  int x = .ss!(int).s;
}

compiles, though the grammar doesn't permit the '.' in front of ss.
Comment 1 github-bugzilla 2012-01-23 15:35:00 UTC
Commit pushed to https://github.com/D-Programming-Language/d-programming-language.org

https://github.com/D-Programming-Language/d-programming-language.org/commit/79ecd142488e0a26b47ce47fede6c5aacfcbc226
fix Issue 3838 - PrimaryExpression rule doesn't permit module scope template instances