annotate undefined/default_argument_10.d @ 1576:b3e16c86558e

[Issue 1398] New: GDC doesn't generate correct code <mariusmuja@gmail.com> 2007-08-04 http://d.puremagic.com/issues/show_bug.cgi?id=1398
author thomask
date Thu, 21 Feb 2008 15:20:08 +0000
parents 095c4b3c140b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
862
095c4b3c140b Unknown W. Brackets <unknown@simplemachines.org>
thomask
parents:
diff changeset
1 // $HeadURL$
095c4b3c140b Unknown W. Brackets <unknown@simplemachines.org>
thomask
parents:
diff changeset
2 // $Date$
095c4b3c140b Unknown W. Brackets <unknown@simplemachines.org>
thomask
parents:
diff changeset
3 // $Author$
095c4b3c140b Unknown W. Brackets <unknown@simplemachines.org>
thomask
parents:
diff changeset
4
095c4b3c140b Unknown W. Brackets <unknown@simplemachines.org>
thomask
parents:
diff changeset
5 // @author@ Unknown W. Brackets <unknown@simplemachines.org>
095c4b3c140b Unknown W. Brackets <unknown@simplemachines.org>
thomask
parents:
diff changeset
6 // @date@ 2006-02-19
095c4b3c140b Unknown W. Brackets <unknown@simplemachines.org>
thomask
parents:
diff changeset
7 // @uri@ news:dtb7ee$gjq$1@digitaldaemon.com
095c4b3c140b Unknown W. Brackets <unknown@simplemachines.org>
thomask
parents:
diff changeset
8
095c4b3c140b Unknown W. Brackets <unknown@simplemachines.org>
thomask
parents:
diff changeset
9 module dstress.undefined.default_argument_10;
095c4b3c140b Unknown W. Brackets <unknown@simplemachines.org>
thomask
parents:
diff changeset
10
095c4b3c140b Unknown W. Brackets <unknown@simplemachines.org>
thomask
parents:
diff changeset
11 void test(out int i = 5){
095c4b3c140b Unknown W. Brackets <unknown@simplemachines.org>
thomask
parents:
diff changeset
12 assert(i == 5);
095c4b3c140b Unknown W. Brackets <unknown@simplemachines.org>
thomask
parents:
diff changeset
13 }
095c4b3c140b Unknown W. Brackets <unknown@simplemachines.org>
thomask
parents:
diff changeset
14
095c4b3c140b Unknown W. Brackets <unknown@simplemachines.org>
thomask
parents:
diff changeset
15 int main(){
095c4b3c140b Unknown W. Brackets <unknown@simplemachines.org>
thomask
parents:
diff changeset
16 int i;
095c4b3c140b Unknown W. Brackets <unknown@simplemachines.org>
thomask
parents:
diff changeset
17 test(i);
095c4b3c140b Unknown W. Brackets <unknown@simplemachines.org>
thomask
parents:
diff changeset
18
095c4b3c140b Unknown W. Brackets <unknown@simplemachines.org>
thomask
parents:
diff changeset
19 assert(i == 5);
095c4b3c140b Unknown W. Brackets <unknown@simplemachines.org>
thomask
parents:
diff changeset
20
095c4b3c140b Unknown W. Brackets <unknown@simplemachines.org>
thomask
parents:
diff changeset
21 return 0;
095c4b3c140b Unknown W. Brackets <unknown@simplemachines.org>
thomask
parents:
diff changeset
22 }
095c4b3c140b Unknown W. Brackets <unknown@simplemachines.org>
thomask
parents:
diff changeset
23