aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/compilable/ddoc6.d
blob: 6d1309016021d0f2c116e3265e24a6bee6fe9019 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 6

/**
 *
 */
struct MyStruct(T)
{
    static if( true )
    {
        void MyStruct() {}
    }
}

void main()
{
}

/+
23
C:\code\d\bugs>dmd -D -o- 148_1.d
148_1.d(6): Error: static if conditional cannot be at global scope
+/