http://d.puremagic.com/issues/show_bug.cgi?id=7838
Summary: Give some error messages for wrong ranges Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: diagnostic Severity: enhancement Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2012-04-05 17:55:22 PDT --- I'd like DMD to give some error messages for wrong definitions of ranges, like in this case: struct Powers { int m; BigInt n; this(int m_) { this.m = m_; } const bool empty = false; BigInt front() { return n ^^ m; } void popFront() { n += 1; } } It looks correct, but it's wrong. ElementType!Powers is void. The correct code (a @property was missing): struct Powers { int m; BigInt n; this(int m_) { this.m = m_; } const bool empty = false; @property BigInt front() { return n ^^ m; } void popFront() { n += 1; } } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------