diff options
Diffstat (limited to 'gcc/testsuite/gdc.test/compilable/json20742.d')
-rw-r--r-- | gcc/testsuite/gdc.test/compilable/json20742.d | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.test/compilable/json20742.d b/gcc/testsuite/gdc.test/compilable/json20742.d new file mode 100644 index 00000000000..3e91dee40cf --- /dev/null +++ b/gcc/testsuite/gdc.test/compilable/json20742.d @@ -0,0 +1,69 @@ +/* +REQUIRED_ARGS: -Xf- -o- -version=Showme +PERMUTE_ARGS: +TEST_OUTPUT: +---- +[ + { + "kind" : "module", + "file" : "compilable$?:windows=\\|/$json20742.d", + "members" : [ + { + "name" : "X1", + "kind" : "struct", + "protection" : "private", + "line" : 52, + "char" : 13, + "members" : [] + }, + { + "name" : "Y2", + "kind" : "struct", + "protection" : "private", + "line" : 59, + "char" : 13, + "members" : [] + }, + { + "name" : "A1", + "kind" : "struct", + "protection" : "private", + "line" : 62, + "char" : 13, + "members" : [] + }, + { + "name" : "B2", + "kind" : "struct", + "protection" : "private", + "line" : 69, + "char" : 13, + "members" : [] + } + ] + } +] +---- + +https://issues.dlang.org/show_bug.cgi?id=20742 +*/ + +version(Showme) + private struct X1 {} +else + private struct X2 {} + +version(Hideme) + private struct Y1 {} +else + private struct Y2 {} + +static if (true) + private struct A1 {} +else + private struct A2 {} + +static if (false) + private struct B1 {} +else + private struct B2 {} |