aboutsummaryrefslogtreecommitdiff
path: root/compiler/tests/verifier/expr_memberfunction.good
blob: 9991af9640d5e180ddf360e2f19ed759c50189af (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


namespace A {
    typedef here = int;
    
    () do_stuff(A this) { }
    () do_pointer_stuff(A^ this) { }
    A copy(A this) { return this; }
    
    A defval = 0;
}

(A a) b;

A c() {
    return 2;
}

() test() {
    A localvar = 1;
    A^ localptr = @localvar;
    
    localvar->do_stuff();
    b.a->do_stuff();
    c()->do_stuff();
    
    localptr->do_pointer_stuff();
    
    A other = :defval->copy();
}