Mercurial > projects > dstress
annotate run/e/enum_49_D.d @ 1320:daef239f37cf
sed'ed replacement of new:...http.d.puremagic.com/issues/ with http://d.puremagic.com/issues/show_bug.cgi?...
author | thomask |
---|---|
date | Sun, 31 Dec 2006 19:59:08 +0000 |
parents | 90cf22616882 |
children |
rev | line source |
---|---|
1147
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
1 // $HeadURL$ |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
2 // $Date$ |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
3 // $Author$ |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
4 |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
5 // @author@ Stewart Gordon <smjg@iname.com> |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
6 // @date@ 2006-09-15 |
1320
daef239f37cf
sed'ed replacement of new:...http.d.puremagic.com/issues/ with http://d.puremagic.com/issues/show_bug.cgi?...
thomask
parents:
1147
diff
changeset
|
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=349 |
1147
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
8 // @desc@ [Issue 349] New: Function matching with enums is erratic |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
9 |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
10 module dstress.run.e.enum_49_D; |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
11 |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
12 enum E : uint{ |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
13 A = 1 |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
14 } |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
15 |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
16 uint foo(E e){ |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
17 return e + 1u; |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
18 } |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
19 |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
20 uint foo(uint u){ |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
21 return u; |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
22 } |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
23 |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
24 int main(){ |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
25 int i = 1; |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
26 if(foo(i) != 1){ |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
27 assert(0); |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
28 } |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
29 |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
30 return 0; |
90cf22616882
[Issue 349] New: Function matching with enums is erratic
thomask
parents:
diff
changeset
|
31 } |