checker: merge ambiguous_function_call tests (#8388)
parent
4fcd8d8a98
commit
684d2e6dbf
|
@ -0,0 +1,13 @@
|
||||||
|
vlib/v/checker/tests/ambiguous_function_call.vv:2:2: error: ambiguous call to: `foo1`, may refer to fn `foo1` or variable `foo1`
|
||||||
|
1 | fn foo1(foo1 int) {
|
||||||
|
2 | foo1(foo1 + 1)
|
||||||
|
| ~~~~~~~~~~~~~~
|
||||||
|
3 | }
|
||||||
|
4 |
|
||||||
|
vlib/v/checker/tests/ambiguous_function_call.vv:7:2: error: ambiguous call to: `foo2`, may refer to fn `foo2` or variable `foo2`
|
||||||
|
5 | fn foo2() {
|
||||||
|
6 | foo2 := 1
|
||||||
|
7 | foo2(foo2)
|
||||||
|
| ~~~~~~~~~~
|
||||||
|
8 | }
|
||||||
|
9 |
|
|
@ -0,0 +1,13 @@
|
||||||
|
fn foo1(foo1 int) {
|
||||||
|
foo1(foo1 + 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn foo2() {
|
||||||
|
foo2 := 1
|
||||||
|
foo2(foo2)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
foo1(5)
|
||||||
|
foo2()
|
||||||
|
}
|
|
@ -1,6 +0,0 @@
|
||||||
vlib/v/checker/tests/ambiguous_function_call_a.vv:2:2: error: ambiguous call to: `foo`, may refer to fn `foo` or variable `foo`
|
|
||||||
1 | fn foo(foo int) {
|
|
||||||
2 | foo(foo + 1)
|
|
||||||
| ~~~~~~~~~~~~
|
|
||||||
3 | }
|
|
||||||
4 |
|
|
|
@ -1,7 +0,0 @@
|
||||||
fn foo(foo int) {
|
|
||||||
foo(foo + 1)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
foo(5)
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
vlib/v/checker/tests/ambiguous_function_call_b.vv:3:2: error: ambiguous call to: `foo`, may refer to fn `foo` or variable `foo`
|
|
||||||
1 | fn foo() {
|
|
||||||
2 | foo := 1
|
|
||||||
3 | foo(foo)
|
|
||||||
| ~~~~~~~~
|
|
||||||
4 | }
|
|
||||||
5 |
|
|
|
@ -1,8 +0,0 @@
|
||||||
fn foo() {
|
|
||||||
foo := 1
|
|
||||||
foo(foo)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
foo()
|
|
||||||
}
|
|
Loading…
Reference in New Issue