view run/e/extern_10_F.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 source

// $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_F;

extern(D) long foo(int a, int b){
	return (a + 1) * b;
}

extern(D) long function(int, int) bar;

int main(){
	bar = &foo;

	if(20 != bar(3, 5)){
		assert(0);
	}

	return 0;
}