changeset 1326:6e6f38cb21a3

[Issue 770] enums and typecasts <thecybershadow@gmail.com> 2006-12-29 http://d.puremagic.com/issues/show_bug.cgi?id=770
author thomask
date Mon, 01 Jan 2007 16:24:38 +0000
parents 693d5d43576e
children e3aa51084bf5
files compile/e/enum_51_A.d run/e/enum_51_B.d
diffstat 2 files changed, 54 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compile/e/enum_51_A.d	Mon Jan 01 16:24:38 2007 +0000
@@ -0,0 +1,15 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	<thecybershadow@gmail.com>
+// @date@	2006-12-29
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=770
+// @desc@	[Issue 770] enums and typecasts
+
+module /*dstress.*/compile.e.enum_51_A;
+
+enum{
+	A = 1,
+	B = 2
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/e/enum_51_B.d	Mon Jan 01 16:24:38 2007 +0000
@@ -0,0 +1,39 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	<thecybershadow@gmail.com>
+// @date@	2006-12-29
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=770
+// @desc@	[Issue 770] enums and typecasts
+
+module /*dstress.*/run.e.enum_51_B;
+import /*dstress.*/compile.e.enum_51_A;
+
+enum Enum1{
+	C = A,
+	D = B
+}
+
+enum Enum2{
+	C = A,
+	D = B
+}
+
+class C{
+	this(){
+		assert(0);
+	}
+	
+	this(Enum1 a, Enum2 b){
+	}
+
+	this(Enum1 a){
+		assert(0);
+	}
+}
+
+int main(){
+	new C(Enum1.C, Enum2.C);
+	return 0;
+}