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

111 Commits

Author SHA1 Message Date
Alexander Medvednikov
f915366ac4 checker: improve the nil fn error a bit 2023-08-09 22:37:11 +03:00
Alexander Medvednikov
428fd7f57f all: do not allow uninitialized function pointers 2023-08-03 21:06:36 +03:00
yuyi
a1aca4c578
checker: fix generic struct field init recursively (related #19014) (#19025) 2023-08-01 07:20:33 +03:00
yuyi
9be80198fc
checker: fix generic struct field with default fn_type value (fix #19011) (#19014) 2023-07-31 21:30:12 +03:00
yuyi
b06811cb0f
checker: clean up ensure_type_exists() (#18860) 2023-07-14 20:44:01 +03:00
yuyi
7f8749afdd
checker: change 'expr(expr_ ast.Expr)' to 'expr(mut expr ast.Expr)' (#18781) 2023-07-05 17:02:22 +03:00
Swastik Baranwal
0ce3e46823
checker: disallow assigning nil to struct fields (#18725) 2023-07-02 14:04:28 +03:00
Felipe Pena
1ee83bf639
checker: disallow using Result !Type as a map[Key]!Type (#18543) 2023-06-25 09:51:10 +03:00
yuyi
68ba39084d
checker: check struct field init with result value (fix #18511) (#18514) 2023-06-22 22:40:11 +03:00
yuyi
22bd1b9d55
ast: clean up ast.StructInit (#18518) 2023-06-22 16:41:08 +03:00
yuyi
76ae9dba5c
checker: check struct init with pointer field (fix #18485) (#18501) 2023-06-21 12:36:28 +03:00
Turiiya
867f4376d8
checker: abstract repetitive error handling (#18507) 2023-06-21 12:13:18 +03:00
yuyi
05f2798c88
ast: remove redundant method is_real_pointer() (#18453) 2023-06-16 09:48:24 +03:00
Swastik Baranwal
fc6726b2b1
checker: no notice for interface field initialized struct with ...other syntax (#18405) 2023-06-11 20:03:20 +03:00
yuyi
42db392e76
checker: fix embedded structure initialization warnings (#18385) 2023-06-09 17:44:15 +03:00
Felipe Pena
05b832a317
cgen: fix none initialization to struct member (#18295) 2023-05-29 15:35:41 +03:00
Felipe Pena
5812579d53
checker: remove check for option being initialized (#18280) 2023-05-27 20:43:54 +02:00
yuyi
2351856fc3
checker: clean up in struct_init() (#18154) 2023-05-12 09:34:55 +03:00
Felipe Pena
e738d671a5
checker: fix [noinit] attr checking with multiple attr (#18079) 2023-04-29 17:07:24 +03:00
Swastik Baranwal
30ac2e8763
checker: disallow assigning anon struct to typed struct (#18017) 2023-04-27 16:54:26 +02:00
yuyi
f4b7f83121
parser, checker: fix generic struct init with field struct init (#18052) 2023-04-26 22:22:15 +03:00
Felipe Pena
377c2e25ff
all: allow recursive struct with option ptr (?&Node) (#17682) 2023-04-18 13:07:21 +02:00
yuyi
6ff1c0a0b2
checker: fix generic struct init with update expr (fix #17824) (#17827) 2023-03-31 10:59:52 +03:00
Alexander Medvednikov
6756d28595 all: 2023 copyright 2023-03-28 22:55:57 +02:00
Heptalon
6b4fb0fc3e
checker: fix missing check for option value on non-optional struct field assignment (#17785) 2023-03-27 04:11:56 +02:00
yuyi
130f35c776
checker: fix embedded struct field with default value (#17777) 2023-03-26 11:33:01 +03:00
yuyi
968b519be5
checker: implement infering generic struct types (#17717) 2023-03-20 20:42:53 +02:00
Felipe Pena
2c349247e1
checker: fix anon fn initialization as struct-like (#17652) 2023-03-17 21:41:00 +01:00
Felipe Pena
658b116d07
checker: fix wrong struct warn about inited fields (#17678) 2023-03-16 21:42:00 +02:00
yuyi
b691e1e24a
checker: check struct embed required field (#17595) 2023-03-11 11:12:26 +02:00
yuyi
65a627d72b
checker: allow aa := AA{}, when AA has an option field, that is a struct, that has a [required] tag on its fields (#17516) 2023-03-06 10:16:05 +02:00
Felipe Pena
c5832379e7
checker, cgen, parser: fix Option/Result error messages (capitalized) (#17486) 2023-03-04 09:02:57 +03:00
Swastik Baranwal
e9a3817aed
checker: disallow enum initalization (#17361) 2023-02-19 22:22:07 +01:00
zakuro
f5423ed26b
checker: fix warning of unnnecessary default none value for option struct fields (#17305) 2023-02-15 11:42:00 +02:00
Felipe Pena
039c9b2550
cgen, checker: fix comptimeselector resolution + if comptime branching improvement + comptimeselector cleanup (#17302) 2023-02-15 11:40:11 +02:00
yuyi
90591eb813
checker: check nested struct field with required attr (fix #10913) (#17277) 2023-02-11 11:22:31 +02:00
Alexander Medvednikov
322eb8197d checker: make null warning an error 2023-02-01 18:01:55 +01:00
yuyi
865c0ea8bd
checker: check generic struct no_keys init (fix #17061) (#17067) 2023-01-22 19:11:12 +02:00
Swastik Baranwal
89aa695fba
checker: disallow non ptr struct values to voidptr fields (#16958) 2023-01-13 17:05:18 +02:00
JalonSolov
90941b3b1f
all: change optional to option (#16914) 2023-01-09 09:36:45 +03:00
Delyan Angelov
2119a240e8
checker: follow up to 43d8bc3, separate setting the default type for fields with default expressions into its own independent loop 2023-01-06 14:47:57 +02:00
Delyan Angelov
43d8bc30f9
checker: fix unset type of a pointer field with default value, when a struct contains an embed (fix #16882) (#16883) 2023-01-05 19:53:37 +02:00
Swastik Baranwal
09766c44b6
checker: disallow struct{...val.$(field.name)} (#16852) 2023-01-03 10:21:32 +02:00
yuyi
51bb630ea4
checker: fix generic fn with short generic struct init syntax (#16828) 2023-01-01 09:14:55 +02:00
yuyi
aad95ac818
cgen: fix generic struct init with inconsistent generic types (fix #16677) (#16702) 2022-12-19 10:43:27 +02:00
Swastik Baranwal
5b4a16e864
checker: add err for unknown generic struct field (#16698) 2022-12-18 11:46:37 +02:00
yuyi
8ab4c7742c
ast, checker: fix generic struct init with inconsistent generic types (#16675) 2022-12-14 14:57:12 +02:00
Felipe Pena
2261606b56
checker: disallow Bar{...foo} when Bar needs more fields, than what foo has (#16609) 2022-12-07 16:56:07 +02:00
yuyi
4eb81d2f05
checker: improve error messages of missing generic type names (#16610) 2022-12-07 11:29:18 +02:00
yuyi
59c979c8d2
checker: check generic interface type specifing type names (fix #16576) (#16591) 2022-12-05 10:05:32 +02:00