changeset 176:49df706d0a10

accessing named union members Geoff Hickey <Geoff_member@pathlink.com> 2004-12-02 news:coo7ep$2089$1@digitaldaemon.com nntp://news.digitalmars.com/digitalmars.D.bugs/2429
author thomask
date Fri, 03 Dec 2004 13:53:26 +0000
parents 915316554721
children dbb7a0ee8baf
files nocompile/union_12.d nocompile/union_13.d nocompile/union_14.d nocompile/union_15.d
diffstat 4 files changed, 93 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/union_12.d	Fri Dec 03 13:53:26 2004 +0000
@@ -0,0 +1,24 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Geoff Hickey <Geoff_member@pathlink.com>
+// @date@	2004-12-02
+// @uri@	news:coo7ep$2089$1@digitaldaemon.com
+// @url@	nntp://news.digitalmars.com/digitalmars.D.bugs/2429
+
+module dstress.nocompile.union_12;
+
+struct MyStruct{
+	union NamedUnion{
+		int i;
+	}
+}
+
+int main(){
+	MyStruct s;
+	s.NamedUnion.i = 1;
+	return 0;
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/union_13.d	Fri Dec 03 13:53:26 2004 +0000
@@ -0,0 +1,24 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Geoff Hickey <Geoff_member@pathlink.com>
+// @date@	2004-12-02
+// @uri@	news:coo7ep$2089$1@digitaldaemon.com
+// @url@	nntp://news.digitalmars.com/digitalmars.D.bugs/2429
+
+module dstress.nocompile.union_13;
+
+class MyClass{
+	union NamedUnion{
+		int i;
+	}
+}
+
+int main(){
+	MyClass s = new MyClass();
+	s.NamedUnion.i = 1;
+	return 0;
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/union_14.d	Fri Dec 03 13:53:26 2004 +0000
@@ -0,0 +1,24 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Geoff Hickey <Geoff_member@pathlink.com>
+// @date@	2004-12-02
+// @uri@	news:coo7ep$2089$1@digitaldaemon.com
+// @url@	nntp://news.digitalmars.com/digitalmars.D.bugs/2429
+
+module dstress.nocompile.union_14;
+
+union MyUnion{
+	union NamedUnion{
+		int i;
+	}
+}
+
+int main(){
+	MyUnion s;
+	s.NamedUnion.i = 1;
+	return 0;
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/union_15.d	Fri Dec 03 13:53:26 2004 +0000
@@ -0,0 +1,21 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Geoff Hickey <Geoff_member@pathlink.com>
+// @date@	2004-12-02
+// @uri@	news:coo7ep$2089$1@digitaldaemon.com
+// @url@	nntp://news.digitalmars.com/digitalmars.D.bugs/2429
+
+module dstress.nocompile.union_15;
+
+union NamedUnion{
+	int i;
+}
+
+int main(){
+	NamedUnion.i = 1;
+	return 0;
+}
+
+