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

49 Commits

Author SHA1 Message Date
shove
721dbec2e4 checker: fix missed check on the initialization of result struct fields (fix #16152) (#16153) 2022-10-22 20:02:11 +03:00
Swastik Baranwal
3e33f4a11d checker: disallow nil assignment on non pointer struct fields (#16056) 2022-10-13 10:36:59 +03:00
Delyan Angelov
b83d0281e4 checker: make the "reference field must be initialised" warning more informative, fix clipboard (used by ui) 2022-10-02 16:24:15 +03:00
Delyan Angelov
35368b5721 checker: small cleanup in Checker.check_ref_fields_initialized 2022-10-02 12:10:35 +03:00
shove
5dae5b2a92 checker: fix references for alias type, that could still be uninitalized (fix #15935) (#15940) 2022-10-01 14:40:55 +03:00
shove
202585e175 checker, parser, fmt: fix visibility of anon struct in different modules.(fix #15763) (#15787) 2022-09-18 18:08:33 +03:00
shove
289f8f2f24 checker: fix nested struct ref field init check for embedded structs (fix #15768) (#15785) 2022-09-16 23:39:15 +03:00
Delyan Angelov
7e69619add builtin, compiler: replace isnil(x) calls with x == unsafe { nil } (a little faster without -prod) (#15759) 2022-09-15 14:59:37 +03:00
shove
8b962f8446 checker: fix nested struct reference type field initialized check. (fix: #15741) (#15752) 2022-09-15 07:59:31 +03:00
yuyi
5719344653 checker: fix struct init with update of mutable receiver (#15758) 2022-09-14 19:46:05 +03:00
yuyi
2693935066 checker: check non generic struct used like a generic one (#15690) 2022-09-07 14:53:43 +03:00
yuyi
e355ae7b3c checker: check generics struct field type error (#15593) 2022-08-29 16:55:26 +03:00
yuyi
42c0bae9ce checker: check unknown array of fn type in struct field (#15502) 2022-08-23 11:15:25 +03:00
yuyi
6d399c5116 checker: fix struct init with update expr (fix #9472) (#15460) 2022-08-18 19:39:41 +03:00
Delyan Angelov
c752e5eb3e checker: add a suggestion for misspelled field names in struct literals 2022-08-10 11:01:43 +03:00
Swastik Baranwal
d6b594c4e8 checker: check if struct field type isn't type (#15359) 2022-08-06 19:11:51 +03:00
yuyi
372857c19c checker: minor cleanup in struct_decl() (#15325) 2022-08-03 13:28:53 +03:00
Alexander Medvednikov
caa0c2f153 vfmt: voidptr(0) => unsafe { nil } (p.1) 2022-07-21 20:46:01 +03:00
yuyi
7029e39088 checker: check struct field with default expression (#15151) 2022-07-21 10:33:34 +03:00
yuyi
eed496d0bc checker: check generic struct declaration (#15106) 2022-07-17 18:09:15 +03:00
yuyi
ac7e809464 checker: fix generics struct init in generic fn (fix #15080) (#15088) 2022-07-15 17:30:56 +03:00
yuyi
9231697966 parser: check for illegal use of any type (fix #15003) (#15020) 2022-07-11 15:29:25 +03:00
Alexander Medvednikov
7d0a9186bb all: wrap up anonymous structs 2022-07-10 12:00:17 +03:00
Alexander Medvednikov
426421bebb all: anonymous structs (part 2) 2022-07-06 21:38:45 +03:00
yuyi
ce6bc2c26d checker: handle void in struct field init (fix #13944) (#14876) 2022-06-28 11:06:25 +03:00
Alexander Medvednikov
e76f74fd73 checker: unsafe 0 for references (default value) 2022-06-26 06:40:40 +03:00
yuyi
de136f6baf checker: improve pub struct check (fix #14446) (#14777) 2022-06-19 17:42:22 +03:00
Alexander Medvednikov
9c72b85f72 checker: temporary c2v struct init fix 2022-06-16 14:24:17 +03:00
Delyan Angelov
410b57b2fa all: add support for struct field deprecation (#14527) 2022-05-26 00:44:18 +03:00
spaceface
332e821518 checker, gen: add support for a [minify] struct attribute (#14247) 2022-05-02 01:59:17 +03:00
yuyi
0a78847782 checker: check error for unknown type in anon fn field of struct (#13778) 2022-03-20 13:28:35 +02:00
yuyi
8c3687aa10 checker: check error for struct field init with nobody anon fn (#13777) 2022-03-20 13:04:31 +02:00
yuyi
dd06698ee3 ast: rename TypeSymbol.is_public to TypeSymbol.is_pub (#13710) 2022-03-10 22:18:57 +02:00
yuyi
c3ec738126 checker: check struct field reference type mismatch (#13575) 2022-02-23 11:53:22 +03:00
Joe Conigliaro
f4051e0252 checker: make sure generic struct instantiation uses a known type. closes #13506 2022-02-18 17:54:52 +11:00
yuyi
b2f984280b checker: strengthen the judgment of generic type parameters replacement, merge generic type init tests (#13460) 2022-02-14 02:38:47 +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
yuyi
a21f4563b3 checker: check the arity and the kinds of the type parameters in generic struct inits (#13429) 2022-02-11 11:21:07 +02:00
yuyi
f2eb50008d parser, checker: cleanup struct short syntax processing (#13416) 2022-02-09 18:31:16 +02:00
yuyi
4be3c92640 checker: check generic struct init without type parameter (#13404) 2022-02-09 14:06:45 +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
a61b4809dc ast, parser, checker: fix generic struct init with inconsistent generic types (#13359) 2022-02-04 14:24:38 +02:00
yuyi
291a1ffd8d token: rename Position to Pos, rename position() to pos() (#13279) 2022-01-26 12:36:28 +02:00
yuyi
edf0bc365c checker: fix ui struct init error with default field value is const variable (#13215) 2022-01-23 18:37:52 +02:00
yuyi
edbb39b81d checker: correct error message of struct_decl() (#13240) 2022-01-21 12:10:09 +02:00
yuyi
155f897270 ast, parser, checker: fix generic struct field with default struct value (#13158) 2022-01-13 22:25:25 +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