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

// error
//
// :5:13: error: ambiguous reference
// :7:9: note: declared here
// :1:1: note: also declared here