[Issue 2624] New: A string mixin should be allowed wherever a type + storage class is
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jan 27 14:35:57 PST 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2624
Summary: A string mixin should be allowed wherever a type +
storage class is
Product: D
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: andrei at metalanguage.com
The following code should compile:
mixin("ref int") f() { static int x; return x; }
This would allow sidestepping the thorny issue of returning a value or a
reference depending on a compile-time condition. Same goes about parameters,
e.g. this should work too:
void f(mixin("ref int") x) { }
--
More information about the Digitalmars-d-bugs
mailing list