http://d.puremagic.com/issues/show_bug.cgi?id=3779
Summary: ["123"][0][$-1] causes __dollar unresolved in compile-time. Product: D Version: 2.041 Platform: Other OS/Version: Mac OS X Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: kenn...@gmail.com --- Comment #0 from kenn...@gmail.com 2010-02-07 08:21:04 PST --- Consider the following sniplet: ---------------------------------------------------------- template E(){ enum E=["123"][0][$-1]; } pragma(msg, E!()); import std.stdio; void main() { writeln(E!()); } ---------------------------------------------------------- Compiling with "dmd" (r287) gives: ---------------------------------------------------------- (["123"][0u])[__dollar - 1u] Undefined symbols: "_D1a6__T1EZ8__dollark", referenced from: _D1a6__T1EZ8__dollark$non_lazy_ptr in a.o (maybe you meant: _D1a6__T1EZ8__dollark$non_lazy_ptr) ld: symbol(s) not found collect2: ld returned 1 exit status --- errorlevel 1 ---------------------------------------------------------- where the expected output from the compiler should be: ---------------------------------------------------------- '3' ---------------------------------------------------------- and links the binary successfully. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------