changeset 1345:b34b5b54b00a

[Issue 887] TypeInfo does not correctly override opCmp, toHash Frits van Bommel <fvbommel@wxs.nl> 2007-01-25 http://d.puremagic.com/issues/show_bug.cgi?id=887
author thomask
date Wed, 14 Feb 2007 10:09:05 +0000
parents 4595aefb732b
children 9084482d7c1e
files run/t/typeid_91_A.d run/t/typeid_91_B.d run/t/typeid_91_C.d run/t/typeid_91_D.d run/t/typeid_91_E.d run/t/typeid_91_F.d
diffstat 6 files changed, 136 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/typeid_91_A.d	Wed Feb 14 10:09:05 2007 +0000
@@ -0,0 +1,20 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Frits van Bommel <fvbommel@wxs.nl>
+// @date@	2007-01-25
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=887
+// @desc@	[Issue 887] TypeInfo does not correctly override opCmp, toHash
+
+module dstress.run.t.typeid_91_A;
+
+typedef int A;
+typedef int B;
+
+int main(){
+	if(0 == typeid(A).opCmp(typeid(B))){
+		assert(0);
+	}
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/typeid_91_B.d	Wed Feb 14 10:09:05 2007 +0000
@@ -0,0 +1,20 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Frits van Bommel <fvbommel@wxs.nl>
+// @date@	2007-01-25
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=887
+// @desc@	[Issue 887] TypeInfo does not correctly override opCmp, toHash
+
+module dstress.run.t.typeid_91_B;
+
+typedef int A;
+alias A B;
+
+int main(){
+	if(0 != typeid(A).opCmp(typeid(B))){
+		assert(0);
+	}
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/typeid_91_C.d	Wed Feb 14 10:09:05 2007 +0000
@@ -0,0 +1,23 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Frits van Bommel <fvbommel@wxs.nl>
+// @date@	2007-01-25
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=887
+// @desc@	[Issue 887] TypeInfo does not correctly override opCmp, toHash
+
+module dstress.run.t.typeid_91_C;
+
+class A{
+}
+
+class B{
+}
+
+int main(){
+	if(0 == typeid(A).opCmp(typeid(B))){
+		assert(0);
+	}
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/typeid_91_D.d	Wed Feb 14 10:09:05 2007 +0000
@@ -0,0 +1,23 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Frits van Bommel <fvbommel@wxs.nl>
+// @date@	2007-01-25
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=887
+// @desc@	[Issue 887] TypeInfo does not correctly override opCmp, toHash
+
+module dstress.run.t.typeid_91_D;
+
+struct A{
+}
+
+struct B{
+}
+
+int main(){
+	if(0 == typeid(A).opCmp(typeid(B))){
+		assert(0);
+	}
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/typeid_91_E.d	Wed Feb 14 10:09:05 2007 +0000
@@ -0,0 +1,25 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Frits van Bommel <fvbommel@wxs.nl>
+// @date@	2007-01-25
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=887
+// @desc@	[Issue 887] TypeInfo does not correctly override opCmp, toHash
+
+module dstress.run.t.typeid_91_E;
+
+enum A{
+	X
+}
+
+enum B{
+	X
+}
+
+int main(){
+	if(0 == typeid(A).opCmp(typeid(B))){
+		assert(0);
+	}
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/typeid_91_F.d	Wed Feb 14 10:09:05 2007 +0000
@@ -0,0 +1,25 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Frits van Bommel <fvbommel@wxs.nl>
+// @date@	2007-01-25
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=887
+// @desc@	[Issue 887] TypeInfo does not correctly override opCmp, toHash
+
+module dstress.run.t.typeid_91_F;
+
+union A{
+	int x;
+}
+
+union B{
+	int x;
+}
+
+int main(){
+	if(0 == typeid(A).opCmp(typeid(B))){
+		assert(0);
+	}
+	return 0;
+}