]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/compilable/fix21585.d
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / compilable / fix21585.d
1 /* TEST_OUTPUT:
2 ---
3 i int
4 d double
5 Pi int*
6 ---
7 */
8
9 pragma(msg, 1.mangleof, " ", __traits(toType, 1.mangleof));
10 pragma(msg, (1.0).mangleof, " ", __traits(toType, (1.0).mangleof));
11 pragma(msg, (int*).mangleof, " ", __traits(toType, (int*).mangleof));
12
13 template Type(T) { alias Type = T; }
14
15 Type!(__traits(toType, 1.mangleof)) j = 3;
16
17 alias T = Type!(__traits(toType, 1.mangleof));
18 static assert(is(T == int));
19
20 __traits(toType, "i") x = 7;
21
22 static assert(is(Type!(__traits(toType, 1.mangleof)) == int));
23 static assert(is(Type!(__traits(toType, (1.0).mangleof)) == double));
24 static assert(is(Type!(__traits(toType, (int*).mangleof)) == int*));