view run/e/enum_49_A.d @ 1147:90cf22616882

[Issue 349] New: Function matching with enums is erratic Stewart Gordon <smjg@iname.com> 2006-09-15 news:bug-349-3@http.d.puremagic.com/issues/
author thomask
date Wed, 20 Sep 2006 19:11:31 +0000
parents
children daef239f37cf
line wrap: on
line source

// $HeadURL$
// $Date$
// $Author$

// @author@	Stewart Gordon <smjg@iname.com>
// @date@	2006-09-15
// @uri@	news:bug-349-3@http.d.puremagic.com/issues/
// @desc@	[Issue 349] New: Function matching with enums is erratic

module dstress.run.e.enum_49_A;

enum E : uint{
	A = 1
}

uint foo(E e){
	return e + 1u;
}

uint foo(uint u){
	return u;
}

int main(){
	if(foo(E.A) != 2){
		assert(0);
	}

	return 0;
}