aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/ambiguous_decl_reference.zig
blob: c32b9a0755d6ca2fafe3e1461ec93459170bb9ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
fn foo() void {}
fn bar() void {
    const S = struct {
        fn baz() void {
            foo();
        }
        fn foo() void {}
    };
    S.baz();
}
export fn entry() void {
    bar();
}

// error
// backend=stage2
// target=native
//
// :5:13: error: ambiguous reference
// :7:9: note: declared here
// :1:1: note: also declared here