1 | namespace n { |
---|---|
2 | struct D { |
3 | int i; |
4 | static int anInt() { return 2; } |
5 | int dump() { return i; } |
6 | }; |
7 | } |
8 | |
9 | using namespace n; |
10 | |
11 | int foo(D* D) { |
12 | return D->dump(); //% self.expect("expression -- D->dump()", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["int", "2"]) |
13 | } |
14 | |
15 | int main (int argc, char const *argv[]) |
16 | { |
17 | D myD { .i: D::anInt() }; |
18 | foo(D: &myD); |
19 | return 0; |
20 | } |
21 |