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


int a;
int a;  // ERROR

typedef b = private;
typedef b = private;    // ERROR

int c();
int c();    // ERROR

int badf(int x, int x); // ERROR

typedef badstr = (
    int y,
    int y,  // ERROR
);


// mixed types of defs
int aa;
typedef aa = private;   // ERROR
int aa();               // ERROR

typedef bb = private;
int bb;     // ERROR

int cc();
int cc;     // ERROR

int badns(int xx);
namespace badns {
    typedef xx = private;   // ERROR but perhaps "int xx" should be wrapped inside an anonymous scope?
}

int dd;
bool dd() { // ERROR
    return 2;
}
bool dd() { // ERROR
    return :false;
}


() func() {
    int i;
    int i;  // ERROR
}

() func2() {
    int y;
    int y:;  // ERROR
}