diff nocompile/delegate_10.d @ 155:2c9eb7937bb2

added delegate tests
author thomask
date Wed, 01 Dec 2004 07:23:29 +0000
parents
children 1f6cf5ccfbc9
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/delegate_10.d	Wed Dec 01 07:23:29 2004 +0000
@@ -0,0 +1,21 @@
+// $HeaderURL$
+// $Date$
+// $Author$
+
+// delegates can only be initialized with non-static member functions
+
+module dstress.nocompile.delegate_10;
+
+union MyUnion{
+	int test;
+	byte b;
+}
+
+int main(){
+	int delegate() dl;
+	
+	MyUnion u;
+	dl = &u.test;
+
+	return 0;
+}