http://d.puremagic.com/issues/show_bug.cgi?id=5865
Summary: __dollar cannot be read at compile time Product: D Version: D2 Platform: All OS/Version: Windows Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: chang...@gmail.com --- Comment #0 from changlon <chang...@gmail.com> 2011-04-19 18:06:47 PDT --- this working on dmd 2.052 release, throw error on dmd git master . ------------------------------------------ class Test1(string name, string file = __FILE__){ static const _file = file ; void test1(){ static const string file2 = _file[0..$] ; } } void main(){ auto obj = new Test1!"Test1" ; obj.test1(); } ----------------------------------------- test.d(5): Error: variable __dollar cannot be read at compile time test.d(5): Error: variable __dollar cannot be read at compile time test.d(10): Error: template instance test.Test1!("Test1") error instantiating -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------