diff run/a/alias_31_B.d @ 826:2559f0f5baad

Sean Kelly <sean@f4.ca> 2006-02-09 news:dsgai7$2cvr$1@digitaldaemon.com
author thomask
date Sun, 12 Feb 2006 08:21:34 +0000
parents
children 9dcac8d4e97f
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/a/alias_31_B.d	Sun Feb 12 08:21:34 2006 +0000
@@ -0,0 +1,29 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Sean Kelly <sean@f4.ca>
+// @date@	2006-02-09
+// @uri@	news:dsgai7$2cvr$1@digitaldaemon.com
+
+module dstress.run.a.alias_31_B;
+
+struct StructOf(Type){
+	Type val;
+
+	template ref(){
+		alias val ref;
+	}
+}
+
+int main(){
+	auto  c = new StructOf!(int)();
+	int x = 3;
+
+	c.ref!() = x;
+
+	if(c.ref!() == 3){
+		return 0;
+	}
+}
+