1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

checker: add a test for the single letter receiver

This commit is contained in:
Alexander Medvednikov 2021-01-28 11:13:51 +01:00
parent 68dab101d9
commit d86cb67eda
3 changed files with 6 additions and 1 deletions

View File

@ -95,7 +95,7 @@ fn main() {
args := os.args.clone() args := os.args.clone()
args_string := args[1..].join(' ') args_string := args[1..].join(' ')
cmd_prefix := args_string.all_before('test-self') cmd_prefix := args_string.all_before('test-self')
title := 'testing all fixed tests' title := 'testing all tests'
all_test_files := os.walk_ext(os.join_path(vroot, 'vlib'), '_test.v') all_test_files := os.walk_ext(os.join_path(vroot, 'vlib'), '_test.v')
testing.eheader(title) testing.eheader(title)
mut tsession := testing.new_test_session(cmd_prefix) mut tsession := testing.new_test_session(cmd_prefix)

View File

@ -0,0 +1,3 @@
vlib/v/checker/tests/receiver_unknown_type_single_letter.vv:1:5: error: unknown type `A`
1 | fn (p A) foo() {}
| ~~~

View File

@ -0,0 +1,2 @@
fn (p A) foo() {}