Mercurial > projects > dstress
changeset 663:27beca9898cc
Ilya Zaitseff <sark7@mail333.com>
2005-08-29
news:op.sv8t4kggaaezs2@ilya.tec.amursk.ru
author | thomask |
---|---|
date | Mon, 12 Sep 2005 05:47:35 +0000 |
parents | 5e5f8438dd86 |
children | 85ddad9606c0 |
files | run/c/class_18_A.d run/c/class_18_B.d |
diffstat | 2 files changed, 60 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/c/class_18_A.d Mon Sep 12 05:47:35 2005 +0000 @@ -0,0 +1,29 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Ilya Zaitseff <sark7@mail333.com> +// @date@ 2005-08-29 +// @uri@ news:op.sv8t4kggaaezs2@ilya.tec.amursk.ru + +module dstress.run.c.class_18_A; + +class Foo { + const int x = 1; + + static class Foo { + const int x = 2; + } + + static class Bar : .Foo{ + } +} + +int main(){ + Foo.Bar a = new Foo.Bar; + assert(Foo.x == 1); + assert(Foo.Foo.x == 2); + assert(a.x == 1); + + return 0; +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/c/class_18_B.d Mon Sep 12 05:47:35 2005 +0000 @@ -0,0 +1,31 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Ilya Zaitseff <sark7@mail333.com> +// @date@ 2005-08-29 +// @uri@ news:op.sv8t4kggaaezs2@ilya.tec.amursk.ru + +module dstress.run.c.class_18_B; + +class Foo { + const int x = 1; + + static class Foo { + const int x = 2; + } + + alias .Foo gFoo; + + static class Bar : gFoo{ + } +} + +int main(){ + Foo.Bar a = new Foo.Bar; + assert(Foo.x == 1); + assert(Foo.Foo.x == 2); + assert(a.x == 1); + + return 0; +} \ No newline at end of file