checker: vfmt overload_return_type.vv (#14557)
parent
78d1b7f4ef
commit
844ba2a177
|
@ -1,6 +1,6 @@
|
|||
vlib/v/checker/tests/overload_return_type.vv:14:11: error: cannot assign to `two`: expected `Point`, not `int`
|
||||
12 | mut one := Point {x:1, y:2}
|
||||
13 | mut two := Point {x:5, y:1}
|
||||
14 | two = one + two
|
||||
vlib/v/checker/tests/overload_return_type.vv:20:8: error: cannot assign to `two`: expected `Point`, not `int`
|
||||
18 | y: 1
|
||||
19 | }
|
||||
20 | two = one + two
|
||||
| ~~~~~~~~~
|
||||
15 | }
|
||||
21 | }
|
||||
|
|
|
@ -9,7 +9,13 @@ fn (a Point) +(b Point) int {
|
|||
}
|
||||
|
||||
fn main() {
|
||||
mut one := Point {x:1, y:2}
|
||||
mut two := Point {x:5, y:1}
|
||||
mut one := Point{
|
||||
x: 1
|
||||
y: 2
|
||||
}
|
||||
mut two := Point{
|
||||
x: 5
|
||||
y: 1
|
||||
}
|
||||
two = one + two
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue