[Issue 7702] New: opDispatch & opCall errors
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Mar 13 06:29:40 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7702
Summary: opDispatch & opCall errors
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: michal.minich at gmail.com
--- Comment #0 from Michal Minich <michal.minich at gmail.com> 2012-03-13 06:29:49 PDT ---
struct S {
template opDispatch (string name) {
void opCall (T) () @property {}
}
}
struct S3 {
auto opCall (T) () @property {
struct S4 {
void opDispatch (string name) () @property {}
}
S4 s4;
return s4;
}
}
void main () {
S s;
s.opDispatch!"x".opCall!int; // OK
s.x.opCall!int; // OK
s.opDispatch!("x")!(int); // parse error
s.x!int; // infinite loop in dmd
S3 s3;
s3.opCall!int.opDispatch!("x"); // OK
s3.opCall!int.x; // OK
s3!int.x; // Error: template instance s3!(int) s3 is not a template
declaration, it is a variable
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list