http://d.puremagic.com/issues/show_bug.cgi?id=10280
Summary: CTFE: Circular variable initializers should be detected properly Product: D Version: D1 & D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: clugd...@yahoo.com.au --- Comment #0 from Don <clugd...@yahoo.com.au> 2013-06-06 00:13:01 PDT --- Currently, when the initializer for a variable accesses that variable in CTFE, it's only indirectly detected via the 'recursion limit exceeded' message. It should be detected directly. --- const int q = foo(); int foo() { return q; } --- rr.d(3): Error: function rr.foo CTFE recursion limit exceeded rr.d(1): called from here: foo() rr.d(3): 1000 recursive calls to function foo rr.d(3): while evaluating q.init rr.d(1): called from here: foo() -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------