changeset 194:4738f3ef80ad

forward reference of enums John Reimer <brk_6502@yahoo.com> 2004-12-11 news:cpfvm8$krm$1@digitaldaemon.com nntp://news.digitalmars.com/digitalmars.D.bugs/2534
author thomask
date Sun, 12 Dec 2004 23:08:32 +0000
parents 7203f4521cb2
children ccc629603f11
files run/enum_10.d run/enum_11.d
diffstat 2 files changed, 56 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/enum_10.d	Sun Dec 12 23:08:32 2004 +0000
@@ -0,0 +1,28 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	John Reimer <brk_6502@yahoo.com>
+// @date@	2004-12-11
+// @uri@	news:cpfvm8$krm$1@digitaldaemon.com
+// @url@	nntp://news.digitalmars.com/digitalmars.D.bugs/2534
+
+module dstress.run.enum_10;
+
+struct Struct{
+	Enum e;
+}
+
+enum Enum{
+	A,
+	B,
+	C
+}
+
+int main(){
+	Struct s;
+	assert(s.e == Enum.A);
+	assert(s.e == 0);
+	return 0;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/enum_11.d	Sun Dec 12 23:08:32 2004 +0000
@@ -0,0 +1,28 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	John Reimer <brk_6502@yahoo.com>
+// @date@	2004-12-11
+// @uri@	news:cpfvm8$krm$1@digitaldaemon.com
+// @url@	nntp://news.digitalmars.com/digitalmars.D.bugs/2534
+
+module dstress.run.enum_11;
+
+enum Enum{
+	A,
+	B,
+	C
+}
+
+struct Struct{
+	Enum e;
+}
+
+int main(){
+	Struct s;
+	assert(s.e == Enum.A);
+	assert(s.e == 0);
+	return 0;
+}
+