diff options
Diffstat (limited to 'gcc/testsuite/gdc.test/compilable/nestedtempl0.d')
-rw-r--r-- | gcc/testsuite/gdc.test/compilable/nestedtempl0.d | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.test/compilable/nestedtempl0.d b/gcc/testsuite/gdc.test/compilable/nestedtempl0.d new file mode 100644 index 00000000000..aa6826b5039 --- /dev/null +++ b/gcc/testsuite/gdc.test/compilable/nestedtempl0.d @@ -0,0 +1,13 @@ +class C2 +{ + class N(alias a) {} +} + +void test2() +{ + int a; + static assert(__traits(isSame, __traits(parent, C2.N!0), C2)); + static assert(__traits(isSame, __traits(parent, C2.N!a), C2)); + static assert(__traits(classInstanceSize, C2.N!0) == size_t.sizeof * 3); + static assert(__traits(classInstanceSize, C2.N!a) == size_t.sizeof * 4); +} |