annotate undefined/typedef_10_H.d @ 1619:bebc7472a832

Fix #7.
author Christian Kamm <kamm incasoftware de>
date Sat, 07 Nov 2009 18:55:30 +0100
parents eb7e3f644b18
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
811
47da30a67c8d Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
1 // $HeadURL$
47da30a67c8d Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
2 // $Date$
47da30a67c8d Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
3 // $Author$
47da30a67c8d Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
4
47da30a67c8d Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
5 // @author@ Stewart Gordon <smjg_1998@yahoo.com>
47da30a67c8d Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
6 // @date@ 2005-12-12
47da30a67c8d Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
7 // @uri@ news:dnjnqe$16sv$1@digitaldaemon.com
47da30a67c8d Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
8
47da30a67c8d Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
9 module dstress.undefined.typedef_10_H;
47da30a67c8d Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
10
47da30a67c8d Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
11 /* When typedefs are arithmetically combined, what should be the type of the
47da30a67c8d Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
12 * result? The spec gives no indication. This testcase asserts the way I
47da30a67c8d Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
13 * feel it should be. (Stewart Gordon)
47da30a67c8d Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
14 */
47da30a67c8d Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
15 typedef int Int;
47da30a67c8d Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
16
47da30a67c8d Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
17 int main() {
47da30a67c8d Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
18 Int i;
47da30a67c8d Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
19 short s;
47da30a67c8d Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
20
944
eb7e3f644b18 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents: 811
diff changeset
21 static assert (is(typeof(i + s) == int));
eb7e3f644b18 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents: 811
diff changeset
22
eb7e3f644b18 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents: 811
diff changeset
23 return 0;
811
47da30a67c8d Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
24 }