aboutsummaryrefslogtreecommitdiff
path: root/compiler/tests/parser/ident_namespace.bad
blob: c82b39e5129f9e4fb04148e8abe28d8a4ae4d18b (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

typedef A = (
    int x:x // ERROR
);

typedef B = enum (
    x:y,  // ERROR
    a:b = 1, // ERROR
);

typedef C[T:U] = ( // ERROR
    T^ x,
);

(int g) f1(int i:j); // ERROR
(int g:h) f2(int i); // ERROR

var A^ a;
var B b;

() test()
{
    /* ERRORS OPTIONAL types are errornous, so this may or may not trigger additional errors */
    a^.x = 123;
    b = :a;
    b = B:x;
    b = :a:b;
    b = :x;

}