changeset 1153:bd7f77817bf7

[Issue 380] New: cannot use typeof(*this) in a static context Tomasz Stachowiak <bugzilla@digitalmars.com> 2006-09-27 news:bug-380-3@http.d.puremagic.com/issues/
author thomask
date Fri, 29 Sep 2006 06:55:39 +0000
parents 0fb7b0fc000a
children 31cf6fcdd6d7
files compile/t/typeof_10_A.d compile/t/typeof_10_B.d compile/t/typeof_10_C.d compile/t/typeof_10_D.d
diffstat 4 files changed, 64 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compile/t/typeof_10_A.d	Fri Sep 29 06:55:39 2006 +0000
@@ -0,0 +1,16 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Tomasz Stachowiak <bugzilla@digitalmars.com>
+// @date@	2006-09-27
+// @uri@	news:bug-380-3@http.d.puremagic.com/issues/
+// @desc@	[Issue 380] New: cannot use typeof(*this) in a static context
+
+module dstress.compile.t.typeof_10_A;
+
+struct Foo{
+        typeof(this) x;
+}
+
+static assert(is(Foo* == typeof(Foo.x)));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compile/t/typeof_10_B.d	Fri Sep 29 06:55:39 2006 +0000
@@ -0,0 +1,16 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Tomasz Stachowiak <bugzilla@digitalmars.com>
+// @date@	2006-09-27
+// @uri@	news:bug-380-3@http.d.puremagic.com/issues/
+// @desc@	[Issue 380] New: cannot use typeof(*this) in a static context
+
+module dstress.compile.t.typeof_10_B;
+
+struct Foo{
+        typeof(*this) x;
+}
+
+static assert(is(Foo == typeof(Foo.x)));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compile/t/typeof_10_C.d	Fri Sep 29 06:55:39 2006 +0000
@@ -0,0 +1,16 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Tomasz Stachowiak <bugzilla@digitalmars.com>
+// @date@	2006-09-27
+// @uri@	news:bug-380-3@http.d.puremagic.com/issues/
+// @desc@	[Issue 380] New: cannot use typeof(*this) in a static context
+
+module dstress.compile.t.typeof_10_C;
+
+struct Foo{
+        typeof(*typeof(this).init) x;
+}
+
+static assert(is(Foo == typeof(Foo.x)));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compile/t/typeof_10_D.d	Fri Sep 29 06:55:39 2006 +0000
@@ -0,0 +1,16 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Tomasz Stachowiak <bugzilla@digitalmars.com>
+// @date@	2006-09-27
+// @uri@	news:bug-380-3@http.d.puremagic.com/issues/
+// @desc@	[Issue 380] New: cannot use typeof(*this) in a static context
+
+module dstress.compile.t.typeof_10_D;
+
+struct Foo{
+        alias typeof(*typeof(this).init) x;
+}
+
+static assert(is(Foo == Foo.x));