Commit Graph

1683 Commits (e6270b05dcf0006867102e7b2a24f0a37a2b27b5)

Author SHA1 Message Date
yuyi e6270b05dc
checker: check unsigned integer compared with negative value (#13670) 2022-03-07 10:26:40 +02:00
yuyi 8136157f87
checker: fix error for 'or expr with nested match expr' (#13658) 2022-03-05 13:06:08 +02:00
yuyi a98eebde7f
checker: add a notice for potentially incorrect smartcasts (#13644) 2022-03-03 16:36:40 +02:00
yuyi 288b13b51d
all: cleanup smartcasts in the compiler (#13639) 2022-03-03 10:48:31 +02:00
ChAoS_UnItY 6a3d34ae11
checker: fix #13626, when unwrapped type is fixed array, and selector expr is 'len' (#13627) 2022-03-02 20:46:18 +02:00
yuyi 0028e557f9
checker: cleanup smartcast in checker.v (#13618) 2022-02-28 17:06:37 +02:00
yuyi efeb3e04da
ast: add table.is_sumtype_or_in_variant() (#13615) 2022-02-28 11:38:20 +03:00
yuyi d30ad344e8
checker: check error for array of sumtype appendding (#13593) 2022-02-24 11:07:03 +02:00
playX b842e89acc
all: initial implementation of compile-time types (#13549) 2022-02-21 17:42:54 +02:00
eyun 67e33bf9bc
checker: make public the valid_comptime_if_os list (#13518) 2022-02-19 15:22:33 +02:00
Delyan Angelov 245b70cabc
checker: bump iface_level_cutoff_limit to 100 (fix ci) 2022-02-17 11:46:04 +02:00
Delyan Angelov 230dc26858
checker: bump iface_level_cutoff_limit to 99 (fix ci) 2022-02-17 11:42:34 +02:00
Delyan Angelov 901a4d8b84
checker: restrict too deep recursion, to prevent stackoverflows on windows
For v itself, the nesting levels do not exceed 15, so a limit of 40 seems reasonable.
2022-02-17 10:04:11 +02:00
yuyi f9fc136c24
all: rename InterfaceDecl.ifaces to InterfaceDecl.embeds (#13475) 2022-02-15 11:17:39 +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
div72 cec7e91714
v.parser, v.checker, v.gen: add support for [translated] tag (#13373) 2022-02-06 00:16:02 +02:00
Vincenzo Palazzo b9fce4ef09
checker: make sure that the operator check is made on the concrete type (#13360) 2022-02-05 00:11:24 +02:00
Delyan Angelov 85d36ed231
checker: stricter type casting error messages 2022-02-03 14:18:30 +02:00
Delyan Angelov 71d98717dc
checker: small cleanup of commit edc6c9e 2022-01-28 11:03:15 +02:00
Yamada Hayao edc6c9e24f
checker: show error instead of panic, when using a `somemodule.NonExistingEnum.enum_value` (#13295) 2022-01-28 11:02:51 +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 d71fc0d13f
checker: fix error for cast to alias of reference struct (#13278) 2022-01-26 12:32:14 +02:00
yuyi ca1f675dba
ast, checker, cgen: implement if guard with multi return optional (#13273) 2022-01-25 14:36:33 +02:00
Delyan Angelov 0347dadf75
ci: vfmt checker.v 2022-01-24 14:01:35 +02:00
skurgs 7fd08eca96
checker: fix c error on improper string to rune cast (#13197) (#13257) 2022-01-24 12:13:22 +02:00
Delyan Angelov 295156e054
checker,cgen: implement v.profile.on/1, support `[if profile]` and `-d no_profile_startup` (#13232) 2022-01-21 03:26:05 +02:00
yuyi 09797e493e
checker: check generics undefined operation of infix expression (#13223) 2022-01-20 08:57:25 +02:00
Tim Basel 14b33baa3b
transformer: refactor + apply transform to (hopefully) all nodes (#13216) 2022-01-20 08:40:16 +02:00
Alexander Medvednikov 38d3239b50 checker: c2v fixes 2022-01-19 15:26:24 +03:00
trueFireblade 727c9fb4a1
all: add string range OrExpr (#13189) 2022-01-17 13:03:10 +03:00
Larpon 7276705684
checker: add support for apk comptime if (#13079) 2022-01-07 13:38:21 +02:00
Ken 7dc64de360
checker: fix error for cast to u8 (#13072) 2022-01-07 12:54:11 +02:00
yuyi 1c382ad2b4
checker: fix error for cast to u8 (#13058) 2022-01-06 18:36:31 +02:00
Delyan Angelov d3489d4246
builtin: s.trim_prefix/1 -> s.trim_string_left/1, s.trim_suffix/1 -> s.trim_string_right/1 2022-01-05 12:49:22 +02:00
Delyan Angelov 57fa9768d5
checker: update error message for `if 'a' in 'abcd' {` 2022-01-05 12:21:17 +02:00
yuyi ba9aad1d92
checker: fix cast to byte in comptime if (#13036) 2022-01-05 09:27:10 +02:00
yuyi 6c1ae4f689
ast: simplify mktyp() (#13028) 2022-01-04 18:37:18 +02:00
Alexander Medvednikov 59ed4be49a all: update copyright year 2022-01-04 12:21:12 +03:00
Delyan Angelov 41e763f79c
checker: add error for `type StructAlias = Struct struct Struct { field StructAlias }` 2022-01-02 15:54:40 +02:00
yuyi 64f1ea6fe9
checker: extract containers.v, struct.v, for.v from checker.v (#13012) 2022-01-02 15:52:19 +02:00
yuyi 6438512529
checker: add error for `for mut var in string {` (fix #12998) (#13000) 2021-12-31 09:54:06 +02:00
Delyan Angelov b10ff1e41b
checker: infer generic interface type in `i := Interface(Struct<u32>{})` 2021-12-30 21:24:52 +02:00
Delyan Angelov ae036b6146
checker: fix infinite recursion on generic interface cast 2021-12-30 19:28:42 +02:00
Delyan Angelov 93c40e696d
all: add support for `type MyEnumAlias = MyEnum` 2021-12-30 13:42:06 +02:00
yuyi d421f28de4
checker: minor cleanup in cast_expr() (#12995) 2021-12-29 21:48:23 +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
yuyi c1711b8f05
checker: check string cast to number (fix #12982) (#12983) 2021-12-28 07:55:39 +02:00
yuyi 34e175a343
checker: minor cleanup of the fns classification (#12977) 2021-12-27 13:11:10 +02:00