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

1971 Commits

Author SHA1 Message Date
Swastik Baranwal
a9a94cfd51
checker: add a separate error msg for fail_if_immutable for anon fns (#18854) 2023-07-13 16:55:06 +03:00
Swastik Baranwal
1c7df29bed
checker: disallow voidptr cast to struct (#18845) 2023-07-12 11:07:34 +03:00
yuyi
6b792b1257
v: use autocasting in complex conditions (#18839) 2023-07-11 14:49:43 +03:00
yuyi
17b576227f
checker: change 'fail_if_immutable(expr_ ast.Expr)' to 'fail_if_immutable(mut expr ast.Expr)' (#18811) 2023-07-07 23:27:52 +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
yuyi
5fd0338399
checker: change smartcast(expr_ ast.Expr,..) to smartcast(mut expr ast.Expr,..) (#18777) 2023-07-04 16:29:11 +03:00
yuyi
c1550b3efa
ast, checker: change stmt(node_ ast.Stmt) to stmt(mut node ast.Stmt) (#18756) 2023-07-03 23:10:00 +03:00
yuyi
44a6741bc3
ast, checker: change check(ast.file &ast.File) to check(mut ast.file ast.File) (#18729) 2023-07-02 09:41:04 +03:00
yuyi
5d4c2cd832
v: use autocasting in complex conditions (#18731) 2023-07-02 09:23:15 +03:00
yuyi
f122703a43
v: use autocasting in if conditions inside the compiler (#18708) 2023-06-29 19:37:36 +03:00
Swastik Baranwal
e48b55fc80
checker: disallow Result type aliases (#18693) 2023-06-27 20:08:37 +03:00
Felipe Pena
d523bb0306
checker: fix missing check for taking address of literal value member (#18570) 2023-06-27 10:54:03 +03:00
yuyi
3e3b289583
checker: check shared parameter assigning (fix #18525) (#18534) 2023-06-24 14:18:11 +03:00
Felipe Pena
2abd2e2c2a
cgen, checker: fix indexexpr with sumtype of array types (#18515) 2023-06-24 09:09:49 +03:00
yuyi
22bd1b9d55
ast: clean up ast.StructInit (#18518) 2023-06-22 16:41:08 +03:00
Turiiya
867f4376d8
checker: abstract repetitive error handling (#18507) 2023-06-21 12:13:18 +03:00
yuyi
b61fdfa094
checker, cgen: fix generic method variable (#18509) 2023-06-21 12:09:53 +03:00
Felipe Pena
c657384f72
cgen: fix alias to option handling (#18490) 2023-06-20 11:55:25 +03:00
Turiiya
a7f00e7594
checker: add hint to sumtype cannot hold reference types error (#18486) 2023-06-20 11:54:57 +03:00
Turiiya
396d46d9ca
ast, builder, checker, parser: fix typos (#18480) 2023-06-18 22:36:17 +03:00
Delyan Angelov
017cc6738b
checker: add a hard to reach limit of 1_000_000 iterations for resolving all generics (usually <10 are enough) (#18477) 2023-06-17 22:29:36 +03:00
Turiiya
9c5aeb62b2
checker: disallow import names and import aliases, shadowing the module name (#18431) 2023-06-17 16:39:10 +03:00
yuyi
acfe785597
all: clean up with is_any_kind_of_pointer() (#18467) 2023-06-17 14:10:06 +03:00
Louis Schmieder
dbd251793e
all: add $res compile time function to get returned value in defer block (#18382) 2023-06-17 14:08:50 +03:00
Felipe Pena
84cf448f2f
checker: fix enum max value validation (#18446) 2023-06-16 09:48:47 +03:00
yuyi
05f2798c88
ast: remove redundant method is_real_pointer() (#18453) 2023-06-16 09:48:24 +03:00
Turiiya
77a1f5928f
checker: include import aliases when checking for import duplicates (#18450) 2023-06-15 02:06:44 +03:00
Felipe Pena
7a25c03aa7
cgen: simplify fixed arr return (#18380) 2023-06-09 14:34:32 +03:00
Turiiya
c06fd556e8
checker: add mutability check for comptime assignments (#18354) 2023-06-06 19:58:30 +03:00
yuyi
f45fc45407
ast, checker, fmt: fix compiler internal formatting failed (#18356) 2023-06-06 16:18:28 +03:00
Felipe Pena
d3c679bdcb
cgen: fix fixed array of map (#18347) 2023-06-05 16:46:48 +03:00
Alexander Medvednikov
9db10c8f61 all: coroutines (part 2) 2023-05-28 05:30:23 +02:00
Alexander Medvednikov
45f16a2640 all: coroutines (part 1) 2023-05-27 23:33:46 +02:00
Turiiya
3e08487198
checker: disallow multiple return values in const declarations (#18273) 2023-05-27 01:55:14 +03:00
yuyi
ddb8e09fec
parser, checker: fix generic fn variable assignment in generic fn (#18180) 2023-05-17 03:06:33 +03:00
Swastik Baranwal
ee7d34e650
checker: allow i32 in enum MyEnum as i32 { (#18172) 2023-05-16 08:09:13 +03:00
Felipe Pena
1e56a69c02
checker, parser: save shared/atomic specifier for ast.Param (#18124) 2023-05-09 00:22:22 +03:00
yuyi
a0a8b7e47a
ast, parser, checker, cgen, fmt: implement generic fn params (fix #14937) (#18126) 2023-05-07 19:53:56 +02:00
Swastik Baranwal
5bcc04e66a
checker: disallow _ = <- quit (#18104) 2023-05-04 21:23:34 +03:00
Mark aka walkingdevel
458132b1b2
checker: make undefined ident error for closures more friendly (#18100) 2023-05-03 08:02:59 +03:00
Mark aka walkingdevel
9eee131423
checker: make type_implements() return false if methods of interface didn't implement (#18076) 2023-04-28 22:18:23 +03:00
Felipe Pena
c63902baf0
checker, cgen: fix generic resolution for comptimeselector and indirection checking on generic funcs (#18043) 2023-04-26 22:49:50 +03:00
Swastik Baranwal
ac58eca015
checker: disallow deferencing a nil pointer (#18038) 2023-04-25 01:10:01 +03:00
Felipe Pena
3b2e58eace
checker: fix missing check for or-block on selectorexpr (#17975) 2023-04-17 16:11:34 +02:00
Delyan Angelov
4a22d4a65d checker: fix v -shared vlib/json on windows 2023-04-17 09:12:05 +03:00
Felipe Pena
a49cecc2b4
cgen: fix array map with it selector expr, used as an it method closure (#17968) 2023-04-16 14:41:07 +03:00
Swastik Baranwal
3d99f1f2c2
checker: disallow struct int to ptr outside unsafe (#17923) 2023-04-13 07:38:21 +02:00
yuyi
92cb7468ce
ast: minor optimization of clear_flags() (#17938) 2023-04-13 07:27:26 +02:00
Felipe Pena
6a60db8768
cgen, checker: fix generic/comptime parameter concrete type resolution in some cases (#17762) 2023-04-10 10:42:49 +03:00
Alexander Medvednikov
83afa1009e checker: fix immutable deref check 2023-04-10 04:59:36 +02:00