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

namespace X1 {
    typedef here[T] = T^;
    int dostuff(X1[T] this) { return 0; }
}
int test1() {
    X1[int] xx = @123;
    xx->dostuff();
    return 0;
}

typedef incomplete X2[T] = T;
namespace X2 {
    int dostuff(X2[T]^ this) { return 0; }
}
int test2() {
    X2[int]^ xx = @123;
    xx->dostuff();
    return 0;
}

namespace X3 {
    typedef here[T] = (T^ x);
    int dostuff(X3[T]^ this) { return 0; }
}
int test3() {
    X3[int]^ xx = @(@123,);
    xx->dostuff();
    return 0;
}