June 26, 2012 [Issue 8300] New: Stack overflow with alias this | ||||
---|---|---|---|---|
| ||||
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: nobody@puremagic.com ReportedBy: rswhite4@googlemail.com --- Comment #0 from rswhite4@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: ------- |
June 26, 2012 [Issue 8300] Stack overflow with alias this | ||||
---|---|---|---|---|
| ||||
Posted in reply to rswhite4@googlemail.com | http://d.puremagic.com/issues/show_bug.cgi?id=8300 Kenji Hara <k.hara.pg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE --- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2012-06-26 01:22:31 PDT --- *** This issue has been marked as a duplicate of issue 8053 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation