[Issue 5304] New: Cannot access __dollar in pure function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Dec 1 12:53:51 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5304
Summary: Cannot access __dollar in pure function
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2010-12-01 12:52:21 PST ---
pure void foo(T...)(T args) {
auto x = args[1 .. $];
}
void main() {
foo(1, 2);
}
DMD 2.050 shows:
test.d(2): Error: pure function 'foo' cannot access mutable static data
'__dollar'
test.d(5): Error: template instance test.foo!(int,int) error instantiating
If I remove "pure" the error vanishes.
--
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