1
0
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:
Sandro Martini 2020-05-08 20:21:47 +02:00 committed by GitHub
parent 4b347ff148
commit 910a8934cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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() {}