mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: fix typo on error message and related test
This commit is contained in:
parent
4b347ff148
commit
910a8934cb
@ -1401,7 +1401,7 @@ fn (mut c Checker) stmt(node ast.Stmt) {
|
|||||||
if it.is_method {
|
if it.is_method {
|
||||||
sym := c.table.get_type_symbol(it.receiver.typ)
|
sym := c.table.get_type_symbol(it.receiver.typ)
|
||||||
if sym.kind == .interface_ {
|
if sym.kind == .interface_ {
|
||||||
c.error('interaces cannot be used as method receiver', it.receiver_pos)
|
c.error('interfaces cannot be used as method receiver', it.receiver_pos)
|
||||||
}
|
}
|
||||||
// if sym.has_method(it.name) {
|
// if sym.has_method(it.name) {
|
||||||
// c.warn('duplicate method `$it.name`', it.pos)
|
// c.warn('duplicate method `$it.name`', it.pos)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
vlib/v/checker/tests/no_interface_receiver.v:5:5: error: interaces cannot be used as method receiver
|
vlib/v/checker/tests/no_interface_receiver.v:5:5: error: interfaces cannot be used as method receiver
|
||||||
3 | }
|
3 | }
|
||||||
4 |
|
4 |
|
||||||
5 | fn (a Animal) str() {}
|
5 | fn (a Animal) str() {}
|
||||||
|
Loading…
Reference in New Issue
Block a user