summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/compilable/ddoc14.d
blob: a8b6d4d9d4cfbf4c09192f8ee701b58feeeea8a3 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh


alias void V;
alias double* P;

/// -1
struct Structure {
    public P variable;  /// 0
    V mNone(lazy P p) {}  /// 1
    pure nothrow V mPrefix(lazy P p) {}   /// 2
    V mSuffix(lazy P p) pure nothrow {}   /// 3
//  pure nothrow V mPrefixTemplate(T)(lazy P p, T[] t...) {}   /// 4
    V mSuffixTemplate(T)(lazy P p, T[] t...) pure nothrow {}   /// 5
    pure nothrow {
        V mScoped(lazy P p) {}    /// 6
    }
    pure nothrow auto mAutoPrefix(ref P p) { return p; } /// 7
//  pure nothrow auto mAutoTemplatePrefix(alias T)(ref T t) { return p; } /// 8
    auto mAutoTemplateSuffix(alias T)(ref T t) pure nothrow { return p; } /// 9
    pure nothrow:
    V mColon(lazy P p) {} /// 10
}

/// -1
class Class {
    public P variable;  /// 0
    V mNone(lazy P p) {}  /// 1
    pure nothrow V mPrefix(lazy P p) {}   /// 2
    V mSuffix(lazy P p) pure nothrow {}   /// 3
//  pure nothrow V mPrefixTemplate(T)(lazy P p, T[] t...) {}   /// 4
    V mSuffixTemplate(T)(lazy P p, T[] t...) pure nothrow {}   /// 5
    pure nothrow {
        V mScoped(lazy P p) {}    /// 6
    }
    pure nothrow auto mAutoPrefix(ref P p) { return p; } /// 7
//  pure nothrow auto mAutoTemplatePrefix(alias T)(ref T t) { return p; } /// 8
    auto mAutoTemplateSuffix(alias T)(ref T t) pure nothrow { return p; } /// 9
    pure nothrow:
    V mColon(lazy P p) {} /// 10
}

/+
/// -1
struct StructTemplate() {
    public P variable;  /// 0
    V mNone(lazy P p) {}  /// 1
    pure nothrow V mPrefix(lazy P p) {}   /// 2
    V mSuffix(lazy P p) pure nothrow {}   /// 3
//  pure nothrow V mPrefixTemplate(T)(lazy P p, T[] t...) {}   /// 4
    V mSuffixTemplate(T)(lazy P p, T[] t...) pure nothrow {}   /// 5
    pure nothrow {
        V mScoped(lazy P p) {}    /// 6
    }
    pure nothrow auto mAutoPrefix(ref P p) { return p; } /// 7
//  pure nothrow auto mAutoTemplatePrefix(alias T)(ref T t) { return p; } /// 8
    auto mAutoTemplateSuffix(alias T)(ref T t) pure nothrow { return p; } /// 9
    pure nothrow:
    V mColon(lazy P p) {} /// 10
}

/// -1
interface Interface {
    V mNone(lazy P p) ;  /// 1
    pure nothrow V mPrefix(lazy P p) ;   /// 2
    V mSuffix(lazy P p) pure nothrow ;   /// 3
//  pure nothrow V mPrefixTemplate(T)(lazy P p, T[] t...) ;   /// 4
    V mSuffixTemplate(T)(lazy P p, T[] t...) pure nothrow ;   /// 5
    pure nothrow {
        V mScoped(lazy P p) ;    /// 6
    }
//  pure nothrow auto mAutoTemplatePrefix(alias T)(ref T t) { return p; } /// 8
    auto mAutoTemplateSuffix(alias T)(ref T t) pure nothrow { return p; } /// 9
    pure nothrow:
    V mColon(lazy P p) ; /// 10
}
+/
    
public P variable;  /// 0
V mNone(lazy P p) {}  /// 1
pure nothrow V mPrefix(lazy P p) {}   /// 2
V mSuffix(lazy P p) pure nothrow {}   /// 3
//  pure nothrow V mPrefixTemplate(T)(lazy P p, T[] t...) {}   /// 4
V mSuffixTemplate(T)(lazy P p, T[] t...) pure nothrow {}   /// 5
pure nothrow {
    V mScoped(lazy P p) {}    /// 6
}
pure nothrow auto mAutoPrefix(ref P p) { return p; } /// 7
//  pure nothrow auto mAutoTemplatePrefix(alias T)(ref T t) { return p; } /// 8
auto mAutoTemplateSuffix(alias T)(ref T t) pure nothrow { return p; } /// 9
pure nothrow:
V mColon(lazy P p) {} /// 10