http://d.puremagic.com/issues/show_bug.cgi?id=8300
Summary: Stack overflow with alias this Product: D Version: D2 Platform: x86_64 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: rswhi...@googlemail.com --- Comment #0 from rswhi...@googlemail.com 2012-06-26 00:50:10 PDT --- If i don't comment out the lines here, the compiler will print "Stack overflow" all the time. I think that's a compiler bug. [code] struct Test(T) { private: T _val; public: /+ @disable this(typeof(null)); +/ /+ this(int i) { } +/ this(T obj) { } @property inout(T) Get() inout { return this._val; } alias Get this; } mixin template TRef(T) { private: Test!(T) _ref; void InitRef() { this._ref = Test!(T)(this); } public: @property inout(Test!(T)) Get() inout { return this._ref; } } class Foo { public: mixin TRef!(Foo); this() { InitRef(); } /+ void echo() const pure nothrow { writeln("Foo"); } +/ alias Get this; } void main() { } [/code] -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------