v/vlib/v/parser/tests
Uwe Krüger d39a55ac11
checker: forbid leaving function from inside `defer` block (#10285)
2021-05-31 17:09:57 +03:00
..
README.md
anon_fn_return_type.out token: fix Token.str() for punctuation and operators (#8610) 2021-02-07 03:40:00 +01:00
anon_fn_return_type.vv parser: add errors for invalid anonymous function (#7786) 2021-01-05 01:32:24 +01:00
anon_unused_param.out parser: require anonymous fn to use `_` for unused parameters (#9262) 2021-03-12 14:17:37 +02:00
anon_unused_param.vv parser: require anonymous fn to use `_` for unused parameters (#9262) 2021-03-12 14:17:37 +02:00
array_init.out parser: improve array init warning (#8024) 2021-01-13 06:03:23 +01:00
array_init.vv parser: improve array init warning (#8024) 2021-01-13 06:03:23 +01:00
array_pos_err.out parser: fix position of array init (#6998) 2020-11-28 17:05:14 +02:00
array_pos_err.vv parser: fix position of array init (#6998) 2020-11-28 17:05:14 +02:00
c_struct_no_embed.out parser: fix fn args eol errors (#7222) 2020-12-10 11:56:08 +02:00
c_struct_no_embed.vv all: struct embedding 2020-10-30 07:09:26 +01:00
const_index.out parser: disallow indexing on next line at top-level (#8128) 2021-01-17 05:30:41 +01:00
const_index.vv parser: disallow indexing on next line at top-level (#8128) 2021-01-17 05:30:41 +01:00
const_missing_rpar_a.out parser: proper unexpected eof errors in const declarations (#9712) 2021-04-15 01:31:49 +02:00
const_missing_rpar_a.vv parser: proper unexpected eof errors in const declarations (#9712) 2021-04-15 01:31:49 +02:00
const_missing_rpar_b.out parser: proper unexpected eof errors in const declarations (#9712) 2021-04-15 01:31:49 +02:00
const_missing_rpar_b.vv parser: proper unexpected eof errors in const declarations (#9712) 2021-04-15 01:31:49 +02:00
const_only_keyword.out parser: proper unexpected eof errors in const declarations (#9712) 2021-04-15 01:31:49 +02:00
const_only_keyword.vv parser: proper unexpected eof errors in const declarations (#9712) 2021-04-15 01:31:49 +02:00
const_unexpected_eof.out parser: proper unexpected eof errors in const declarations (#9712) 2021-04-15 01:31:49 +02:00
const_unexpected_eof.vv parser: proper unexpected eof errors in const declarations (#9712) 2021-04-15 01:31:49 +02:00
dec_use_as_value.out tests: use .vv files directly in compiler_errors_test.v 2020-08-25 18:14:06 +03:00
dec_use_as_value.vv parser: add error for `for i := 0; i++; i < ..` (#5850) 2020-07-17 10:31:58 +03:00
defer_propagate.out checker: forbid leaving function from inside `defer` block (#10285) 2021-05-31 17:09:57 +03:00
defer_propagate.vv checker: forbid leaving function from inside `defer` block (#10285) 2021-05-31 17:09:57 +03:00
defer_return.out checker: forbid leaving function from inside `defer` block (#10285) 2021-05-31 17:09:57 +03:00
defer_return.vv checker: forbid leaving function from inside `defer` block (#10285) 2021-05-31 17:09:57 +03:00
defer_return2.out checker: forbid leaving function from inside `defer` block (#10285) 2021-05-31 17:09:57 +03:00
defer_return2.vv checker: forbid leaving function from inside `defer` block (#10285) 2021-05-31 17:09:57 +03:00
duplicate_field_embed_err.out all: reimplement struct embedding with methods (#7506) 2020-12-23 19:12:49 +01:00
duplicate_field_embed_err.vv all: reimplement struct embedding with methods (#7506) 2020-12-23 19:12:49 +01:00
duplicate_type_a.out tests: use .vv files directly in compiler_errors_test.v 2020-08-25 18:14:06 +03:00
duplicate_type_a.vv parser: fail when interface name is duplicated (#5828) 2020-07-14 18:52:51 +02:00
duplicate_type_b.out tests: use .vv files directly in compiler_errors_test.v 2020-08-25 18:14:06 +03:00
duplicate_type_b.vv parser: fail when interface name is duplicated (#5828) 2020-07-14 18:52:51 +02:00
duplicated_generic_err.out all: implement multiple generics (#8231) 2021-01-22 13:49:56 +01:00
duplicated_generic_err.vv all: implement multiple generics (#8231) 2021-01-22 13:49:56 +01:00
expected_type_enum_err.out parser: fix expected type enum error pos (#7265) 2020-12-11 19:23:29 +02:00
expected_type_enum_err.vv parser: fix expected type enum error pos (#7265) 2020-12-11 19:23:29 +02:00
expecting_assign_type_alias.out parser: require assign on type alias (#6477) 2020-09-25 12:02:32 +02:00
expecting_assign_type_alias.vv parser: require assign on type alias (#6477) 2020-09-25 12:02:32 +02:00
expr_evaluated_but_not_used_a.out tests: use .vv files directly in compiler_errors_test.v 2020-08-25 18:14:06 +03:00
expr_evaluated_but_not_used_a.vv parser: `expression evaluated but not used` error 2020-06-16 11:06:53 +02:00
expr_evaluated_but_not_used_b.out tests: use .vv files directly in compiler_errors_test.v 2020-08-25 18:14:06 +03:00
expr_evaluated_but_not_used_b.vv parser: `expression evaluated but not used` error 2020-06-16 11:06:53 +02:00
expr_evaluated_but_not_used_c.out tests: use .vv files directly in compiler_errors_test.v 2020-08-25 18:14:06 +03:00
expr_evaluated_but_not_used_c.vv parser: `expression evaluated but not used` error 2020-06-16 11:06:53 +02:00
expr_evaluated_but_not_used_d.out parser: check not used expression for all exprs in multi-expr (#8733) 2021-02-15 17:41:04 +02:00
expr_evaluated_but_not_used_d.vv parser: check not used expression for all exprs in multi-expr (#8733) 2021-02-15 17:41:04 +02:00
expr_evaluated_but_not_used_e.out parser: check not used expression for all exprs in multi-expr (#8733) 2021-02-15 17:41:04 +02:00
expr_evaluated_but_not_used_e.vv parser: check not used expression for all exprs in multi-expr (#8733) 2021-02-15 17:41:04 +02:00
expr_evaluated_but_not_used_if.out parser: report unused expression error in if and or blocks (#6953) 2020-11-26 00:28:41 +01:00
expr_evaluated_but_not_used_if.vv parser: report unused expression error in if and or blocks (#6953) 2020-11-26 00:28:41 +01:00
expr_evaluated_but_not_used_or.out parser: report unused expression error in if and or blocks (#6953) 2020-11-26 00:28:41 +01:00
expr_evaluated_but_not_used_or.vv parser: report unused expression error in if and or blocks (#6953) 2020-11-26 00:28:41 +01:00
fn_attributes_duplicate_multiple.out tests: use .vv files directly in compiler_errors_test.v 2020-08-25 18:14:06 +03:00
fn_attributes_duplicate_multiple.vv parser/cgen: multiple attributes & better errors (closes #5334) 2020-06-15 22:59:09 +10:00
fn_attributes_duplicate_single.out tests: use .vv files directly in compiler_errors_test.v 2020-08-25 18:14:06 +03:00
fn_attributes_duplicate_single.vv parser/cgen: multiple attributes & better errors (closes #5334) 2020-06-15 22:59:09 +10:00
fn_attributes_empty_err.out tests: use .vv files directly in compiler_errors_test.v 2020-08-25 18:14:06 +03:00
fn_attributes_empty_err.vv parser/cgen: multiple attributes & better errors (closes #5334) 2020-06-15 22:59:09 +10:00
fn_decl_unexpected_eof.out scanner: fix eof token position (#9432) 2021-03-23 08:51:09 +01:00
fn_decl_unexpected_eof.vv scanner: fix eof token position (#9432) 2021-03-23 08:51:09 +01:00
fn_type_only_args_in_interfaces.out types: rename `any_*`, `untyped *` -> `* literal` (#7845) 2021-01-04 00:11:09 +02:00
fn_type_only_args_in_interfaces.vv parser: fix interface functions with no params (ui examples) 2020-06-29 10:53:12 +03:00
fn_type_only_args_no_body.out tests: use .vv files directly in compiler_errors_test.v 2020-08-25 18:14:06 +03:00
fn_type_only_args_no_body.vv parser: disallow fns with type only args and a body 2020-06-29 10:21:01 +03:00
fn_type_only_args_unknown_name.out tests: use .vv files directly in compiler_errors_test.v 2020-08-25 18:14:06 +03:00
fn_type_only_args_unknown_name.vv parser: disallow fns with type only args and a body 2020-06-29 10:21:01 +03:00
fn_use_builtin_err.out parser: check for builtin function redefinitions (fix #7499) (#7507) 2020-12-23 18:17:09 +02:00
fn_use_builtin_err.vv parser: check for builtin function redefinitions (fix #7499) (#7507) 2020-12-23 18:17:09 +02:00
for.out parser: disallow index variable with range `for` (#6464) 2020-09-24 15:52:44 +03:00
for.vv parser: disallow index variable with range `for` (#6464) 2020-09-24 15:52:44 +03:00
for_in_mut_index_of_array.out parser: check for_in mut key (#8235) 2021-01-21 12:46:15 +01:00
for_in_mut_index_of_array.vv parser: check for_in mut key (#8235) 2021-01-21 12:46:15 +01:00
for_in_mut_key_of_map.out parser: check for_in mut key (#8235) 2021-01-21 12:46:15 +01:00
for_in_mut_key_of_map.vv parser: check for_in mut key (#8235) 2021-01-21 12:46:15 +01:00
function_variadic_arg_non_final.out checker: show position for variadic/shared/method argument errors (#8939) 2021-02-24 19:35:32 +01:00
function_variadic_arg_non_final.vv checker: show position for variadic/shared/method argument errors (#8939) 2021-02-24 19:35:32 +01:00
generic_lowercase_err.out all: implement multiple generics (#8231) 2021-01-22 13:49:56 +01:00
generic_lowercase_err.vv all: implement multiple generics (#8231) 2021-01-22 13:49:56 +01:00
if_guard_redefinition.out parser: fix if-guard redefinition (#9425) 2021-03-23 04:38:36 +01:00
if_guard_redefinition.vv parser: fix if-guard redefinition (#9425) 2021-03-23 04:38:36 +01:00
inc_use_as_value.out tests: use .vv files directly in compiler_errors_test.v 2020-08-25 18:14:06 +03:00
inc_use_as_value.vv parser: add error for `for i := 0; i++; i < ..` (#5850) 2020-07-17 10:31:58 +03:00
interface_duplicate_interface_method.out interfaces: error on implemention of own interface method & on duplicate normal methods 2021-03-03 15:02:10 +11:00
interface_duplicate_interface_method.vv interfaces: error on implemention of own interface method & on duplicate normal methods 2021-03-03 15:02:10 +11:00
interface_duplicate_method.out interfaces: error on implemention of own interface method & on duplicate normal methods 2021-03-03 15:02:10 +11:00
interface_duplicate_method.vv interfaces: error on implemention of own interface method & on duplicate normal methods 2021-03-03 15:02:10 +11:00
invalid_attribute_a.out ast: use `AttrKind` (#9845) 2021-04-23 15:51:52 +03:00
invalid_attribute_a.vv ast: use `AttrKind` (#9845) 2021-04-23 15:51:52 +03:00
invalid_attribute_b.out ast: use `AttrKind` (#9845) 2021-04-23 15:51:52 +03:00
invalid_attribute_b.vv ast: use `AttrKind` (#9845) 2021-04-23 15:51:52 +03:00
invalid_attribute_c.out ast: use `AttrKind` (#9845) 2021-04-23 15:51:52 +03:00
invalid_attribute_c.vv ast: use `AttrKind` (#9845) 2021-04-23 15:51:52 +03:00
invalid_attribute_d.out ast: use `AttrKind` (#9845) 2021-04-23 15:51:52 +03:00
invalid_attribute_d.vv ast: use `AttrKind` (#9845) 2021-04-23 15:51:52 +03:00
invalid_fn_decl_script_err.out parser: proper error on fn decl in script mode (#7680) 2020-12-30 21:18:36 +02:00
invalid_fn_decl_script_err.vv parser: proper error on fn decl in script mode (#7680) 2020-12-30 21:18:36 +02:00
invalid_recursive_struct1_err.out parser: error on recursive struct (#7964) 2021-01-09 01:33:36 +01:00
invalid_recursive_struct1_err.vv parser: error on recursive struct (#7964) 2021-01-09 01:33:36 +01:00
invalid_recursive_struct2_err.out parser: error on recursive struct (#7964) 2021-01-09 01:33:36 +01:00
invalid_recursive_struct2_err.vv parser: error on recursive struct (#7964) 2021-01-09 01:33:36 +01:00
long_generic_err.out all: implement multiple generics (#8231) 2021-01-22 13:49:56 +01:00
long_generic_err.vv all: implement multiple generics (#8231) 2021-01-22 13:49:56 +01:00
map_init.out parser: assure explicit `map` init contains no parameters (#8299) 2021-01-24 01:06:43 +02:00
map_init.vv parser: assure explicit `map` init contains no parameters (#8299) 2021-01-24 01:06:43 +02:00
map_init_void.out parser: assure explicit `map` init contains no parameters (#8299) 2021-01-24 01:06:43 +02:00
map_init_void.vv parser: assure explicit `map` init contains no parameters (#8299) 2021-01-24 01:06:43 +02:00
map_init_void2.out parser: assure explicit `map` init contains no parameters (#8299) 2021-01-24 01:06:43 +02:00
map_init_void2.vv parser: assure explicit `map` init contains no parameters (#8299) 2021-01-24 01:06:43 +02:00
match_range_dotdot_err.out tests: use .vv files directly in compiler_errors_test.v 2020-08-25 18:14:06 +03:00
match_range_dotdot_err.vv parser: force `...` rather than `..` in matches for inclusive ranges (#5852) 2020-07-17 11:30:21 +03:00
method_decl_on_non_local_array.out parser: error on non local array/map methods & add tests 2020-12-11 20:50:26 +11:00
method_decl_on_non_local_array.vv parser: error on non local array/map methods & add tests 2020-12-11 20:50:26 +11:00
method_decl_on_non_local_map.out parser: error on non local array/map methods & add tests 2020-12-11 20:50:26 +11:00
method_decl_on_non_local_map.vv parser: error on non local array/map methods & add tests 2020-12-11 20:50:26 +11:00
method_decl_on_non_local_type.out parser: error on non local array/map methods & add tests 2020-12-11 20:50:26 +11:00
method_decl_on_non_local_type.vv parser: error on non local array/map methods & add tests 2020-12-11 20:50:26 +11:00
module_multiple_names_err.out parser: improve syntax errors in module declarations 2021-03-11 10:42:36 +02:00
module_multiple_names_err.vv parser: improve syntax errors in module declarations 2021-03-11 10:42:36 +02:00
module_syntax_err.out parser: improve syntax errors in module declarations 2021-03-11 10:42:36 +02:00
module_syntax_err.vv parser: improve syntax errors in module declarations 2021-03-11 10:42:36 +02:00
multi_argumented_assign_err.out parser: fix the position of the multi variable += assign error (#7584) 2020-12-26 19:48:58 +02:00
multi_argumented_assign_err.vv parser: fix the position of the multi variable += assign error (#7584) 2020-12-26 19:48:58 +02:00
nested_defer.out checker: forbid leaving function from inside `defer` block (#10285) 2021-05-31 17:09:57 +03:00
nested_defer.vv checker: forbid leaving function from inside `defer` block (#10285) 2021-05-31 17:09:57 +03:00
nested_unsafe_expr.out parser: clean error when nesting `unsafe` (#6656) 2020-10-20 22:57:24 +03:00
nested_unsafe_expr.vv parser: clean error when nesting `unsafe` (#6656) 2020-10-20 22:57:24 +03:00
nested_unsafe_stmt.out parser: clean error when nesting `unsafe` (#6656) 2020-10-20 22:57:24 +03:00
nested_unsafe_stmt.vv parser: clean error when nesting `unsafe` (#6656) 2020-10-20 22:57:24 +03:00
operator_normal_fn.out parser: error if operators are used as function names (#7532) 2020-12-24 13:38:11 +02:00
operator_normal_fn.vv parser: error if operators are used as function names (#7532) 2020-12-24 13:38:11 +02:00
or_default_missing.out parser: support `x = a[k] ?` propagation for arrays and maps (#8199) 2021-01-19 14:46:47 +02:00
or_default_missing.vv parser: support `x = a[k] ?` propagation for arrays and maps (#8199) 2021-01-19 14:46:47 +02:00
postfix_err.out tests: use .vv files directly in compiler_errors_test.v 2020-08-25 18:14:06 +03:00
postfix_err.vv parser: warn if PostfixExpr followed by `]` or `)` token (#6214) 2020-08-25 08:50:06 +02:00
postfix_inc.out parser: improve printing of unexpected tokens (#8654) 2021-02-09 17:07:30 +02:00
postfix_inc.vv parser: require ++/-- to be on the same line as the previous token (#8621) 2021-02-07 23:10:16 +01:00
prefix_first.out all: improve unused variable warning (fix `x = 1`, `x += 1` etc) 2021-04-23 13:33:48 +03:00
prefix_first.vv all: improve unused variable warning (fix `x = 1`, `x += 1` etc) 2021-04-23 13:33:48 +03:00
select_bad_key_1.out parser: implement parsing of `select` block (#6379) 2020-09-16 15:34:57 +02:00
select_bad_key_1.vv parser: implement parsing of `select` block (#6379) 2020-09-16 15:34:57 +02:00
select_bad_key_2.out parser: implement parsing of `select` block (#6379) 2020-09-16 15:34:57 +02:00
select_bad_key_2.vv parser: implement parsing of `select` block (#6379) 2020-09-16 15:34:57 +02:00
select_bad_key_3.out parser: implement parsing of `select` block (#6379) 2020-09-16 15:34:57 +02:00
select_bad_key_3.vv parser: implement parsing of `select` block (#6379) 2020-09-16 15:34:57 +02:00
select_bad_key_4.out parser: implement parsing of `select` block (#6379) 2020-09-16 15:34:57 +02:00
select_bad_key_4.vv parser: implement parsing of `select` block (#6379) 2020-09-16 15:34:57 +02:00
select_else_1.out parser: implement parsing of `select` block (#6379) 2020-09-16 15:34:57 +02:00
select_else_1.vv parser: implement parsing of `select` block (#6379) 2020-09-16 15:34:57 +02:00
select_else_2.out parser: implement parsing of `select` block (#6379) 2020-09-16 15:34:57 +02:00
select_else_2.vv parser: implement parsing of `select` block (#6379) 2020-09-16 15:34:57 +02:00
sql_no_db_expr_a.out parser: improve error message for missing db expr in ORM (#9890) 2021-04-26 19:51:51 +03:00
sql_no_db_expr_a.vv parser: improve error message for missing db expr in ORM (#9890) 2021-04-26 19:51:51 +03:00
sql_no_db_expr_b.out parser: improve error message for missing db expr in ORM (#9890) 2021-04-26 19:51:51 +03:00
sql_no_db_expr_b.vv parser: improve error message for missing db expr in ORM (#9890) 2021-04-26 19:51:51 +03:00
string_invalid_prefix_err.out parser: add an error for an invalid string prefix (#7019) 2020-11-30 10:58:00 +02:00
string_invalid_prefix_err.vv parser: add an error for an invalid string prefix (#7019) 2020-11-30 10:58:00 +02:00
struct_embed_duplicate.out all: struct embedding 2020-10-30 07:09:26 +01:00
struct_embed_duplicate.vv all: struct embedding 2020-10-30 07:09:26 +01:00
struct_embed_unknown_module.out all: struct embedding 2020-10-30 07:09:26 +01:00
struct_embed_unknown_module.vv all: struct embedding 2020-10-30 07:09:26 +01:00
struct_embed_wrong_pos_long_err.out parser: proper error when declaring struct embedding at the wrong pos (#7920) 2021-01-06 15:46:36 +01:00
struct_embed_wrong_pos_long_err.vv parser: proper error when declaring struct embedding at the wrong pos (#7920) 2021-01-06 15:46:36 +01:00
struct_embed_wrong_pos_short_err.out parser: proper error when declaring struct embedding at the wrong pos (#7920) 2021-01-06 15:46:36 +01:00
struct_embed_wrong_pos_short_err.vv parser: proper error when declaring struct embedding at the wrong pos (#7920) 2021-01-06 15:46:36 +01:00
struct_field_expected.out parser: improve printing of unexpected tokens (#8654) 2021-02-09 17:07:30 +02:00
struct_field_expected.vv token: fix Token.str() for punctuation and operators (#8610) 2021-02-07 03:40:00 +01:00
struct_field_unknown_module_a.out parser: improve error message for `mod.unknownsubmod.Type` (#9976) 2021-05-04 11:31:31 +03:00
struct_field_unknown_module_a.vv parser: improve error message for `mod.unknownsubmod.Type` (#9976) 2021-05-04 11:31:31 +03:00
struct_field_unknown_module_b.out parser: improve error message for `mod.unknownsubmod.Type` (#9976) 2021-05-04 11:31:31 +03:00
struct_field_unknown_module_b.vv parser: improve error message for `mod.unknownsubmod.Type` (#9976) 2021-05-04 11:31:31 +03:00
struct_field_unknown_module_c.out parser: improve error message for `mod.unknownsubmod.Type` (#9976) 2021-05-04 11:31:31 +03:00
struct_field_unknown_module_c.vv parser: improve error message for `mod.unknownsubmod.Type` (#9976) 2021-05-04 11:31:31 +03:00
struct_module_section.out parser: support `module:` for immutable private struct fields (#8140) 2021-01-17 05:39:44 +01:00
struct_module_section.vv parser: support `module:` for immutable private struct fields (#8140) 2021-01-17 05:39:44 +01:00
struct_update_err.out parser: improve printing of unexpected tokens (#8654) 2021-02-09 17:07:30 +02:00
struct_update_err.vv parser: struct updating syntax with `Abc{...oldabc newfield: val}` (#7865) 2021-01-04 20:19:03 +02:00
too_many_generics_err.out all: implement multiple generics (#8231) 2021-01-22 13:49:56 +01:00
too_many_generics_err.vv all: implement multiple generics (#8231) 2021-01-22 13:49:56 +01:00
type_alias_existing_type_err.out parser: differentiate recursive alias & existing type err + rune fix 2020-12-16 18:03:49 +11:00
type_alias_existing_type_err.vv parser: differentiate recursive alias & existing type err + rune fix 2020-12-16 18:03:49 +11:00
type_alias_same_type_err.out parser: differentiate recursive alias & existing type err + rune fix 2020-12-16 18:03:49 +11:00
type_alias_same_type_err.vv parser: differentiate recursive alias & existing type err + rune fix 2020-12-16 18:03:49 +11:00
uncomplete_module_call_err.out parser: improve printing of unexpected tokens (#8654) 2021-02-09 17:07:30 +02:00
uncomplete_module_call_err.vv parser: fix error when accessing module without name after dot (#7530) 2020-12-25 16:50:08 +02:00
unexpected_expr.out parser: improve printing of unexpected tokens (#8654) 2021-02-09 17:07:30 +02:00
unexpected_expr.vv parser: improve printing of unexpected tokens (#8654) 2021-02-09 17:07:30 +02:00
unexpected_keyword.out parser: fix method name test 2021-02-04 22:25:58 +01:00
unexpected_keyword.vv parser: improve the error message for unexpected keywords 2021-01-25 15:29:07 +02:00
unnecessary_mut.out parser: smartcast mutable selector (#6881) 2020-11-19 21:05:10 +01:00
unnecessary_mut.vv all: improve unused variable warning (fix `x = 1`, `x += 1` etc) 2021-04-23 13:33:48 +03:00
unnecessary_mut_2.out parser: move mut in if/match to expr (#6973) 2020-11-27 03:08:42 +01:00
unnecessary_mut_2.vv parser: smartcast mutable selector (#6881) 2020-11-19 21:05:10 +01:00

README.md

Put here tests, ensuring that the v's parser errors for certain situations.