Mercurial > projects > dstress
changeset 1563:17cb36e8f9ae
r8716@birke: tk | 2007-09-30 00:19:01 +0200
[Issue 1533] Crash unknown symbol with std.signals
<regan@netmail.co.nz>
2007-09-07
http://d.puremagic.com/issues/show_bug.cgi?id=1533
author | thomask |
---|---|
date | Sun, 30 Sep 2007 09:45:13 +0000 |
parents | 539ede0215a4 |
children | 1d41f2132ef4 |
files | nocompile/t/this_16_B.d nocompile/t/this_16_C.d nocompile/t/this_16_D.d run/t/this_16_A.d |
diffstat | 4 files changed, 117 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/t/this_16_B.d Sun Sep 30 09:45:13 2007 +0000 @@ -0,0 +1,28 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ <regan@netmail.co.nz> +// @date@ 2007-09-07 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1533 +// @desc@ [Issue 1533] Crash unknown symbol with std.signals + +// __DSTRESS_ELINE__ 24 + +module dstress.nocompile.t.this_16_B; + +template T(){ + this(int i){ + check = i; + } + + int check; +} + +class C{ + void foo(){ + bar(); + this.t.check++; + } + mixin T!() t; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/t/this_16_C.d Sun Sep 30 09:45:13 2007 +0000 @@ -0,0 +1,24 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ <regan@netmail.co.nz> +// @date@ 2007-09-07 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1533 +// @desc@ [Issue 1533] Crash unknown symbol with std.signals + +// __DSTRESS_ELINE__ 20 + +module dstress.nocompile.t.this_16_C; + +template T(){ + int check; +} + +class C{ + void foo(){ + bar(); + this.t.check++; + } + mixin T!() t; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/t/this_16_D.d Sun Sep 30 09:45:13 2007 +0000 @@ -0,0 +1,24 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ <regan@netmail.co.nz> +// @date@ 2007-09-07 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1533 +// @desc@ [Issue 1533] Crash unknown symbol with std.signals + +// __DSTRESS_ELINE__ 21 + +module dstress.nocompile.t.this_16_D; + +template T(){ + this(){ + } +} + +class C{ + void foo(){ + bar(); + } + mixin T!() t; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/this_16_A.d Sun Sep 30 09:45:13 2007 +0000 @@ -0,0 +1,41 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ <regan@netmail.co.nz> +// @date@ 2007-09-07 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1533 +// @desc@ [Issue 1533] Crash unknown symbol with std.signals + +module dstress.run.t.this_16_A; + +template T(){ + this(int i){ + check = i; + } + + int check; +} + +class C{ + void foo(){ + bar(); + this.t.check++; + } + mixin T!() t; + + void bar(){ + this.t.check++; + } +} + +int main(){ + C c = new C(100); + c.foo(); + + if(102 != c.t.check){ + assert(0); + } + + return 0; +}