Commit Graph

56 Commits (a17d744e8b8b8913da33587f02c2cfd28a62afa7)

Author SHA1 Message Date
playX a17d744e8b
checker: c2v: allow passing fixed array as pointer to functions; bool <-> int (#14309) 2022-05-05 10:59:49 +02:00
yuyi f9c4cbdb15
checker: check argument mismatch of array.filter/all/any() (#14273) 2022-05-04 11:52:32 +02:00
Daniel Däschle 85cb0a8c85
all: basic implementation of result type (#14140) 2022-04-30 16:26:27 +02:00
yuyi 549735fbff
checker: check error for array.index() argument (#14147) 2022-04-25 19:07:31 +02:00
yuyi 47e7582af8
parser, checker, cgen: fix error for fn call using anon fn call argument (#14155) 2022-04-25 19:07:29 +02:00
yuyi 0b7c3a6035
checker: simplify checking array.contains() argument (#14133) 2022-04-25 19:07:28 +02:00
yuyi 0a12fd7212
checker: fix error for fn with array of aliases argument (#14123) 2022-04-25 19:07:26 +02:00
yuyi eca95dcedc
checker: check array builtin method's arguments (#14119) 2022-04-25 19:07:26 +02:00
yuyi 8824f5f103
checker: check map builtin method's arguments (#14120) 2022-04-25 19:07:26 +02:00
yuyi 81a178ee8d
checker, cgen: use 'stmts.last()' instead of 'stmts[stmts.len - 1]' (#14105) 2022-04-21 10:34:34 +02:00
yuyi 9c7da323f1
checker: check error for arguments of array.contains() (#14102) 2022-04-21 10:34:33 +02:00
playX 0065dba88a
checker: c2v fixes (#14091) 2022-04-21 10:34:33 +02:00
JalonSolov 43efdd464e
checker: fix error message when number of generic parameters is incorrect (#14090) 2022-04-21 10:34:33 +02:00
yuyi 898167f986
checker: check error for fn decl with optional arguments (#14076) 2022-04-19 12:42:43 +02:00
Delyan Angelov df30b79971
checker: allow for `arr.any(opt_fn()?)`, add test 2022-04-09 19:50:10 +03:00
crthpl b232a3b0d1
cgen: fix `.filter()` and `.map()` on shared arrays (#13954) 2022-04-07 18:05:11 +03:00
StunxFS 725b472d37
checker: fix typos (#13929) 2022-04-04 10:07:53 +03:00
Alexander Medvednikov a55e930c00 checker: fix pointer checks in translated code 2022-04-04 05:35:15 +03:00
Delyan Angelov 44603f8e59
checker: add suggestions for misspelled `mod.func_name()` calls 2022-04-03 20:07:52 +03:00
Vincenzo Palazzo 51c1d666c2
checker: fix operator overloads (for large structs with > 8 fields, the method receiver is normally auto converted to a reference) (#13889) 2022-04-03 19:30:29 +03:00
yuyi bc98c11d9d
parser, checker, cgen: minor cleanup of go_expr() (#13875) 2022-03-31 19:58:04 +03:00
yuyi d40a502981
checker: minor cleanup in fn_call() (#13873) 2022-03-30 21:05:17 +03:00
Delyan Angelov cc637e5ee8
checker: make the misssing shared/mut modifer in fn and method calls error clearer 2022-03-30 01:45:40 +03:00
yuyi c71770d9c5
checker: fix error for array of anon fn call (#13858) 2022-03-29 18:04:30 +03:00
yuyi fd34ebd84e
checker: check the count of generics in fn arguments (#13855) 2022-03-29 10:04:19 +03:00
Vincenzo Palazzo 8b072aa962
checker: check if generic values have the same types (#13718) 2022-03-23 09:13:10 +02:00
yuyi 3e40cd5baa
ast, checker, cgen: fix error for go anon fn variable call (#13776) 2022-03-20 07:45:23 +02:00
Delyan Angelov 7a4715288c
checker: make the errors for call expression shared/mut mismatches more detailed 2022-03-16 22:45:35 +02:00
Alexander Medvednikov 36ec47cd20 all: replace "NB:" with "Note:" (docs/comments) 2022-03-06 20:01:22 +03:00
yuyi b5e7cef1b1
ast: define 'const invalid_type_idx = -1' (#13573) 2022-02-23 11:54:43 +03:00
yuyi 0208e9672d
checker: check array sort_with_compare callback function parameters (#13511) 2022-02-19 10:06:36 +02:00
yuyi f8b8950b96
checker: check mut interface arguments (#13479) 2022-02-16 11:53:41 +02:00
yuyi b5379255da
checker, cgen: fix error for struct embed with fn type (#13450) 2022-02-12 20:55:40 +02:00
Delyan Angelov 799c95dc4e
tests: filter test_ fns with params from the list of automatically run test functions (fix #13443) 2022-02-12 17:30:20 +02:00
yuyi 7178367de0
all: fix error for comptime for in field with generic fn (fix #13409) (#13439) 2022-02-11 22:00:13 +02:00
Tim Basel 9d0a5942ac
builtin: change IError `msg` and `code` to methods + fix vlib, add a deprecation notice for the old usages (#13041) 2022-02-11 15:52:33 +02:00
Delyan Angelov 9ed18efa53
checker: error on redefining any of the public builtin functions, not just ['print', 'println', 'eprint', 'eprintln', 'isnil', 'panic', 'exit'] (#13419) 2022-02-10 12:26:30 +02:00
div72 cec7e91714
v.parser, v.checker, v.gen: add support for [translated] tag (#13373) 2022-02-06 00:16:02 +02:00
yuyi b34860e39b
ast, checker: fix error for calling complex nested generic type function (fix #13025) (#13328) 2022-01-31 13:00:27 +02:00
Delyan Angelov e1a2ab345d
parser,ast,checker: add support for `[deprecated: "use another module"] module obsolete` 2022-01-27 12:34:14 +02:00
yuyi 291a1ffd8d
token: rename Position to Pos, rename position() to pos() (#13279) 2022-01-26 12:36:28 +02:00
yuyi 3bfad1b943
checker: fix method call errors for generic struct instances (#13261) 2022-01-24 12:45:19 +02:00
yuyi 39f80840d7
checker: check type mismatch in args of generics method calls (fix #13193) (#13196) 2022-01-17 16:48:59 +02:00
trueFireblade 9fd65b5b18
checker: fix unrecognised empty argument names in anon fn's (#13176) 2022-01-15 08:23:30 +02:00
yuyi 1654d8b810
checker: fix generics with nested generic fn inst call (#13059) 2022-01-06 18:33:37 +02:00
Delyan Angelov b3930c3d6a
checker: add error for .map() calling a fn with multiple return values (prevent inaccessible tuple leak) 2022-01-04 23:10:58 +02:00
yuyi 7622ff3f54
checker: check using const var as function (#13006) 2022-01-01 09:15:43 +02:00
Delyan Angelov 43fee6b3d5
all: fix registration of methods with the same name on different generic structs 2021-12-28 21:42:48 +02:00
Alexander Medvednikov 6176ce9f03 all: c2v fixes 2021-12-28 08:00:56 +03:00
yuyi 34e175a343
checker: minor cleanup of the fns classification (#12977) 2021-12-27 13:11:10 +02:00