changeset 413:ad4e3b6d6192

static / non-static overload Kirs <fu@bar.com> 2005-04-08 news:d37pf8$17b3$2@digitaldaemon.com
author thomask
date Sat, 09 Apr 2005 06:14:14 +0000
parents 6fe8e3a31aed
children 558f2ca8d898
files run/opCatAssign_13.d run/overload_19.d run/overload_20.d run/overload_21.d run/overload_22.d
diffstat 5 files changed, 120 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/run/opCatAssign_13.d	Fri Apr 08 19:19:04 2005 +0000
+++ b/run/opCatAssign_13.d	Sat Apr 09 06:14:14 2005 +0000
@@ -2,8 +2,6 @@
 // $Date$
 // $Author$
 
-// __DSTRESS_ELINE__
-
 module dstress.run.opCatAssign_13;
 
 static ~this(){
@@ -29,4 +27,4 @@
 
 int main(){
 	return 0;
-}
\ No newline at end of file
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/overload_19.d	Sat Apr 09 06:14:14 2005 +0000
@@ -0,0 +1,31 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Kirs <fu@bar.com>
+// @date@	2005-04-08
+// @uri@	news:d37pf8$17b3$2@digitaldaemon.com
+
+module dstress.run.overload_19;
+
+class Foo{
+	int init (int x) {
+		return 0;
+	}
+
+	static void init (long y) {
+		return 1;
+	}
+}
+
+int main(){
+	assert(Foo.init(2L)==1);
+	Foo f = new Foo;
+	assert(Foo.init(3L)==1);
+	assert(f.init(4L)==1);
+	assert(f.init(5)==0);
+	return 0;
+}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/overload_20.d	Sat Apr 09 06:14:14 2005 +0000
@@ -0,0 +1,31 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Kirs <fu@bar.com>
+// @date@	2005-04-08
+// @uri@	news:d37pf8$17b3$2@digitaldaemon.com
+
+module dstress.run.overload_20;
+
+struct Foo{
+	int init (int x) {
+		return 0;
+	}
+
+	static void init (long y) {
+		return 1;
+	}
+}
+
+int main(){
+	assert(Foo.init(2L)==1);
+	Foo f = new Foo;
+	assert(Foo.init(3L)==1);
+	assert(f.init(4L)==1);
+	assert(f.init(5)==0);
+	return 0;
+}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/overload_21.d	Sat Apr 09 06:14:14 2005 +0000
@@ -0,0 +1,31 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Kirs <fu@bar.com>
+// @date@	2005-04-08
+// @uri@	news:d37pf8$17b3$2@digitaldaemon.com
+
+module dstress.run.overload_21;
+
+union Foo{
+	int init (int x) {
+		return 0;
+	}
+
+	static void init (long y) {
+		return 1;
+	}
+}
+
+int main(){
+	assert(Foo.init(2L)==1);
+	Foo f = new Foo;
+	assert(Foo.init(3L)==1);
+	assert(f.init(4L)==1);
+	assert(f.init(5)==0);
+	return 0;
+}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/overload_22.d	Sat Apr 09 06:14:14 2005 +0000
@@ -0,0 +1,26 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Kirs <fu@bar.com>
+// @date@	2005-04-08
+// @uri@	news:d37pf8$17b3$2@digitaldaemon.com
+
+module dstress.run.overload_22;
+
+int init (int x) {
+	return 0;
+}
+
+static void init (long y) {
+	return 1;
+}
+
+int main(){
+	assert(init(3L)==1);
+	assert(init(5)==0);
+	return 0;
+}
+
+
+