changeset 543:4b941e2f6d4f

typedef & class members Mizuno Hiroki <hiroki1124@hotmail.com> 2005-05-16 news:d6ac08$1uug$1@digitaldaemon.com
author thomask
date Tue, 17 May 2005 15:26:54 +0000
parents c4c408b85f15
children 19e36f020f57
files reporter.txt run/t/typedef_06_A.d run/t/typedef_06_B.d run/t/typedef_06_C.d run/t/typedef_07_A.d run/t/typedef_07_B.d run/t/typedef_07_C.d run/t/typedef_08_A.d run/t/typedef_08_B.d run/t/typedef_08_C.d
diffstat 10 files changed, 242 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/reporter.txt	Tue May 17 14:44:52 2005 +0000
+++ b/reporter.txt	Tue May 17 15:26:54 2005 +0000
@@ -44,6 +44,7 @@
 Mike Swieton		<mike@swieton.net>
 Mike Parker		<aldacron71@yahoo.com>
 MicroWizard
+Mizuno Hiroki		<hiroki1124@hotmail.com>
 ndove 			http://www.dsource.org/forums/profile.php?mode=viewprofile&u=142
 Oskar Linde		<d98-oliRE.MO.VE@nada.kth.se>
 Patrick Down
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/typedef_06_A.d	Tue May 17 15:26:54 2005 +0000
@@ -0,0 +1,26 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Mizuno Hiroki <hiroki1124@hotmail.com>
+// @date@	2005-05-16
+// @uri@	news:d6ac08$1uug$1@digitaldaemon.com
+
+module dstress.run.t.typedef_06_A;
+
+class Org{
+	int i;
+}
+
+typedef Org Ali;
+
+int main(){
+	Ali a = new Ali;
+
+	assert(a.i==0);
+	a.i=2;
+	assert(a.i==2);
+	
+	return 0;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/typedef_06_B.d	Tue May 17 15:26:54 2005 +0000
@@ -0,0 +1,26 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Mizuno Hiroki <hiroki1124@hotmail.com>
+// @date@	2005-05-16
+// @uri@	news:d6ac08$1uug$1@digitaldaemon.com
+
+module dstress.run.t.typedef_06_B;
+
+class Org{
+	int dyn(int i){
+		return i*2;
+	}
+}
+
+typedef Org Ali;
+
+int main(){
+	Ali a = new Ali;
+
+	assert(a.dyn(3)==6);
+	
+	return 0;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/typedef_06_C.d	Tue May 17 15:26:54 2005 +0000
@@ -0,0 +1,27 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Mizuno Hiroki <hiroki1124@hotmail.com>
+// @date@	2005-05-16
+// @uri@	news:d6ac08$1uug$1@digitaldaemon.com
+
+module dstress.run.t.typedef_06_C;
+
+class Org{
+	static int stat(int i){
+		return i*3;
+	}
+}
+
+typedef Org Ali;
+
+int main(){
+	Ali a = new Ali;
+
+	assert(a.stat(3)==9);
+	assert(Ali.stat(4)==12);
+	
+	return 0;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/typedef_07_A.d	Tue May 17 15:26:54 2005 +0000
@@ -0,0 +1,26 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Mizuno Hiroki <hiroki1124@hotmail.com>
+// @date@	2005-05-16
+// @uri@	news:d6ac08$1uug$1@digitaldaemon.com
+
+module dstress.run.t.typedef_07_A;
+
+struct Org{
+	int i;
+}
+
+typedef Org Ali;
+
+int main(){
+	Ali a;
+
+	assert(a.i==0);
+	a.i=2;
+	assert(a.i==2);
+	
+	return 0;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/typedef_07_B.d	Tue May 17 15:26:54 2005 +0000
@@ -0,0 +1,26 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Mizuno Hiroki <hiroki1124@hotmail.com>
+// @date@	2005-05-16
+// @uri@	news:d6ac08$1uug$1@digitaldaemon.com
+
+module dstress.run.t.typedef_07_B;
+
+struct Org{
+	int dyn(int i){
+		return i*2;
+	}
+}
+
+typedef Org Ali;
+
+int main(){
+	Ali a;
+
+	assert(a.dyn(3)==6);
+	
+	return 0;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/typedef_07_C.d	Tue May 17 15:26:54 2005 +0000
@@ -0,0 +1,28 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Mizuno Hiroki <hiroki1124@hotmail.com>
+// @date@	2005-05-16
+// @uri@	news:d6ac08$1uug$1@digitaldaemon.com
+
+module dstress.run.t.typedef_07_C;
+
+struct Org{
+	static int stat(int i){
+		return i*3;
+	}
+}
+
+typedef Org Ali;
+
+int main(){
+	Ali a;
+
+	assert(a.stat(3)==9);
+	assert(Ali.stat(4)==12);
+	assert(Org.stat(5)==15);
+	
+	return 0;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/typedef_08_A.d	Tue May 17 15:26:54 2005 +0000
@@ -0,0 +1,26 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Mizuno Hiroki <hiroki1124@hotmail.com>
+// @date@	2005-05-16
+// @uri@	news:d6ac08$1uug$1@digitaldaemon.com
+
+module dstress.run.t.typedef_08_A;
+
+union Org{
+	int x;
+}
+
+typedef Org Ali;
+
+int main(){
+	Ali a;
+
+	assert(a.x==0);
+	a.x=2;
+	assert(a.x==2);
+	
+	return 0;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/typedef_08_B.d	Tue May 17 15:26:54 2005 +0000
@@ -0,0 +1,27 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Mizuno Hiroki <hiroki1124@hotmail.com>
+// @date@	2005-05-16
+// @uri@	news:d6ac08$1uug$1@digitaldaemon.com
+
+module dstress.run.t.typedef_08_B;
+
+union Org{
+	int x;
+	int dyn(int i){
+		return i*2;
+	}	
+}
+
+typedef Org Ali;
+
+int main(){
+	Ali a;
+
+	assert(a.dyn(3)==6);
+	
+	return 0;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/typedef_08_C.d	Tue May 17 15:26:54 2005 +0000
@@ -0,0 +1,29 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Mizuno Hiroki <hiroki1124@hotmail.com>
+// @date@	2005-05-16
+// @uri@	news:d6ac08$1uug$1@digitaldaemon.com
+
+module dstress.run.t.typedef_08_C;
+
+union Org{
+	int x;
+	static int stat(int i){
+		return i*3;
+	}	
+}
+
+typedef Org Ali;
+
+int main(){
+	Ali a;
+
+	assert(a.stat(3)==9);
+	assert(Ali.stat(4)==12);
+	assert(Org.stat(5)==15);
+	
+	return 0;
+}
+