diff run/e/extern_10_B.d @ 1442:bfebb405f3ed

r7390@birke: tk | 2007-03-29 16:07:56 +0200 [Issue 957] linkage attributes for function level declarations are ignored Thomas K?hne <thomas-dloop@kuehne.cn> 2007-02-13 http://d.puremagic.com/issues/show_bug.cgi?id=957
author thomask
date Sat, 31 Mar 2007 08:26:20 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/e/extern_10_B.d	Sat Mar 31 08:26:20 2007 +0000
@@ -0,0 +1,26 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Thomas Kühne <thomas-dloop@kuehne.cn>
+// @date@	2007-02-13
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=957
+// @desc@	[Issue 957] linkage attributes for function level declarations are ignored
+
+module dstress.run.e.extern_10_B;
+
+extern(Pascal) long foo(int a, int b){
+	return (a + 1) * b;
+}
+
+extern(Pascal) long function(int, int) bar;
+
+int main(){
+	bar = &foo;
+
+	if(20 != bar(3, 5)){
+		assert(0);
+	}
+
+	return 0;
+}