Delyan Angelov
5098334e65
os: add execute_or_exit(cmd), use it consistently instead of execute_or_panic(cmd)
2021-07-20 15:22:04 +03:00
Daniel Däschle
60b705b4c4
checker, gen: implement basic struct embed direct field init support ( #10871 )
2021-07-20 15:06:06 +03:00
Daniel Däschle
ad3835b598
parser: deprecate short struct init ( #10842 )
2021-07-20 11:17:08 +03:00
Enzo
1db354c360
v.gen.c: fix codegen ordering problem with interfaces with interface fields ( #10862 )
2021-07-19 19:57:12 +03:00
yuyi
8e99a018df
checker, cgen: fix generics interface method ( #10858 )
2021-07-19 13:29:46 +03:00
yuyi
cf82bd3407
checker: fix fixed array with const unint type size ( fix #10826 ) ( #10853 )
2021-07-19 12:44:03 +03:00
yuyi
fdba3607af
checker: fix generics fn selector expr with unexpected symbol ( #10851 )
2021-07-19 09:16:15 +03:00
Delyan Angelov
8ea576783b
tests: fix failed consts test (it now works properly)
2021-07-19 01:18:39 +03:00
yuyi
8b8f496762
checker: fix generics fn return generic interface ( fix #10818 ) ( #10831 )
2021-07-18 08:55:19 +03:00
Delyan Angelov
6edfb2c7fe
v.parser: eliminate PrefixExpr from `&Type(x).name` and `&Type(x)[idx]` too (fix vinix build)
2021-07-17 20:20:20 +03:00
yuyi
3a0fa550b6
checker: fix generics fn inferring map type ( fix #10835 ) ( #10839 )
2021-07-17 17:49:21 +03:00
spaceface
22fcbe70a2
checker: allow omitting `{}` in trailing struct args ( #10832 )
2021-07-17 15:44:44 +03:00
crthpl
ec47cda386
cgen: fix other generic pointer cases ( #10834 )
2021-07-17 11:51:42 +03:00
shadowninja55
355f46f475
gen: implement `thread.str()` ( #10820 )
2021-07-17 11:19:28 +03:00
shadowninja55
0d587d3580
checker: prohibit using non-lvalue as mut receiver ( #10790 )
2021-07-16 13:03:40 +03:00
spaceface
ebc34c237b
cgen: fix generating invalid Option decls for generic interfaces ( #10817 )
2021-07-15 22:15:25 +03:00
yuyi
ddaac5af92
checker: fix generics with multi generic struct types ( #10808 )
2021-07-15 17:39:55 +03:00
spaceface
6e942bf4c2
v: initial support for generic interfaces and sumtypes ( #10795 )
2021-07-15 08:29:13 +03:00
yuyi
fe1cf2ea26
cgen: fix error of the map literals method call ( #10791 )
2021-07-14 22:03:47 +03:00
yuyi
ed78e638b3
cgen: fix if_expr with array methods cond ( #10786 )
2021-07-13 19:51:49 +03:00
Delyan Angelov
d444dbd4d9
tests: add a multilevel pointer cast test too
2021-07-13 14:08:50 +03:00
yuyi
2a9d6fef9f
cgen: fix initialization errors with fixed array aliases ( #10784 )
2021-07-13 10:51:54 +03:00
shadowninja55
7694afa44c
checker: check that `mut` args are lvalues ( #10779 )
2021-07-13 08:06:39 +03:00
yuyi
1b26ce1f7a
cgen: fix array of alias's slice() ( #10772 )
2021-07-12 15:59:01 +03:00
yuyi
5c7881feb7
checker: fix error of for_in alias ( #10770 )
2021-07-12 09:17:00 +03:00
yuyi
719bf63f16
scanner: fix nested multiline comments ( #10760 )
2021-07-12 07:17:38 +03:00
zakuro
ba9b53cc4d
cgen: fix error when using anon generics fn that have generics struct arg ( #10751 )
2021-07-11 19:30:41 +03:00
yuyi
a3ed9c1bbd
cgen: fix fixed array of function str() ( fix #10744 ) ( #10753 )
2021-07-11 19:24:33 +03:00
Louis Schmieder
eb96ad11d9
checker: add pkgconfig to comptime if ( #10692 )
2021-07-09 18:17:04 +03:00
yuyi
310bb1a8a6
cgen: fix generics with variadic generic args ( #10700 )
2021-07-09 12:09:30 +03:00
yuyi
fb9b2e873c
checker: fix generic fn with assign reference generic struct ( fix #10681 ) ( #10695 )
2021-07-08 16:50:25 +03:00
yuyi
6436d9a827
cgen: fix error of generic array typedef ( #10679 )
2021-07-07 12:42:53 +03:00
crthpl
d14de5fdaf
all: fix generic functions with pointer args ( #10686 )
2021-07-07 11:51:05 +03:00
yuyi
9f8c3cc159
cgen: fix fn return array of interface ( #10677 )
2021-07-06 16:33:26 +03:00
yuyi
59d80e2758
cgen: fix interface fn return with struct_init ( #10675 )
2021-07-06 10:14:13 +03:00
El Koulali András
dacfb71820
cgen: fix string interpolation where the expression generates multiple C statements ( #10674 )
2021-07-06 09:04:29 +03:00
yuyi
1857874d1a
tests: rename anon_fn_with_array_arguments.v to anon_fn_with_array_arguments_test.v ( #10650 )
2021-07-05 21:08:31 +03:00
Uwe Krüger
a1f123bd42
cgen: enable string index error handling `s[i] or {...}` ( #10670 )
2021-07-05 21:00:30 +03:00
Lukas Neubert
9e61321d4c
cgen: fix VUNREACHABLE inside ternary ( #10672 )
2021-07-05 18:26:01 +03:00
shadowninja55
da9c75f2ca
checker: string != IError ( #10665 )
2021-07-05 05:05:08 +03:00
yuyi
665279938e
checker: fix nested generic struct init ( fix #10652 ) ( #10659 )
2021-07-04 18:37:31 +03:00
yuyi
f246d73d6e
cgen: fix generic fn return mut parameter ( #10662 )
2021-07-04 18:36:37 +03:00
yuyi
5a4a1997e7
cgen: fix empty struct initilization ( #10651 )
2021-07-03 20:11:56 +03:00
yuyi
21512d1491
checker: fix generic fn inferring multi paras type ( fix #10623 ) ( #10626 )
2021-07-02 17:38:57 +03:00
yuyi
c0f855ace7
cgen: fix anon optional fn ( fix #10640 ) ( #10644 )
2021-07-02 17:07:05 +03:00
Daniel Däschle
3881e97a40
vlib: remove ustring usage ( #10618 )
2021-06-30 22:30:28 +03:00
shadowninja55
f45f30a9c2
checker, cgen: fix aliased array methods ( #10603 )
2021-06-29 12:14:37 +03:00
yuyi
04221475d1
cgen: fix go call interface method ( fix #10520 ) ( #10602 )
2021-06-29 11:16:15 +03:00
yuyi
4af4f2b5a5
cgen: fix `go fn(mut x Interface){ println(x) }(x)` ( #10585 )
2021-06-28 16:31:11 +03:00
yuyi
0ac0ab6b4b
cgen: fix auto str for sumtype with alias ( #10599 )
2021-06-28 14:17:00 +03:00
shadowninja55
2e5ed08558
v.parser: allow anonymous function to return a function ( #10592 )
2021-06-28 11:51:24 +03:00
yuyi
67d1b72e36
cgen: fix interface with nested fields ( fix #10077 ) ( #10589 )
2021-06-28 10:24:05 +03:00
Delyan Angelov
c3b9eaf146
v.c.gen: fix codegen of auto str methods for structs having &voidptr fields
2021-06-28 10:05:42 +03:00
spaceface
4bed4afef7
cgen: fix clash in generated variant and method names ( #10581 )
2021-06-27 19:05:32 +03:00
shadowninja55
ea3983a91b
checker: require .sort() body for some types ( #10550 )
2021-06-27 17:17:03 +03:00
yuyi
51075ffa15
cgen: fix fn mut val of interface type ( #10568 )
2021-06-26 18:13:48 +03:00
shadowninja55
eb5afb7403
checker: prohibit selective const imports ( #10574 )
2021-06-26 18:09:52 +03:00
yuyi
e9de30373f
table: fix interface embedding with interface parameter ( #10567 )
2021-06-25 12:52:25 +03:00
yuyi
4bfe76123a
generics: fix generic fn type mismatch of returning a generic struct ( #10553 )
2021-06-24 12:47:36 +03:00
BigBlack
8324a766e8
checker: allow for `unsafe {*(p+1) = 22}` ( #10557 )
2021-06-24 12:39:42 +03:00
yuyi
e8a1e9d88f
cgen: fix interface only declare with optional method ( #10546 )
2021-06-23 15:14:08 +03:00
Delyan Angelov
69227b8be7
tests: bump up sleep times in break_in_lock_test.v, so that its results are stabler
2021-06-23 14:14:53 +03:00
Delyan Angelov
b6bd6d1d35
tests: add cmd/tools/vdoc/tests/vdoc_file_test.v, extract a `v.util.diff` module, cleanup
2021-06-22 18:52:34 +03:00
yuyi
6dbe8a8a2c
cgen: fix for in mut reference selector val ( fix #10524 ) ( #10536 )
2021-06-21 19:25:18 +03:00
yuyi
da4b6b934d
checker: fix map assign array of interface values ( #10532 )
2021-06-21 19:24:42 +03:00
Uwe Krüger
8f2f377cb1
v.checker,v.gen.c: extend auto heap mechanism to objects used as interfaces ( #10529 )
2021-06-21 07:10:10 +03:00
Uwe Krüger
f32a76b268
all: promote value type function arguments to heap if necessary ( #10528 )
2021-06-20 18:40:24 +03:00
yuyi
6c8182cc25
cgen: fix assigning literal fixed arrays to map values ( #10525 )
2021-06-20 13:36:01 +03:00
yuyi
1a52da9f62
tests: add as_cast_already_smartcast_sumtype_test.v ( #10517 )
2021-06-19 18:50:09 +03:00
Delyan Angelov
d56ae2d508
v.fmt: keep comments after struct embeds
2021-06-18 18:42:05 +03:00
yuyi
2298063129
checker: fix nested if smartcast selector exprs ( fix #10372 #10379 ) ( #10502 )
2021-06-18 14:49:15 +03:00
crthpl
4abb1a8b7b
cgen: fix unknown labels in addressing ( #10503 )
2021-06-18 13:03:38 +03:00
Uwe Krüger
3f5aa5e634
sync: make `Semaphore.*wait()` robust against interrupts by signals ( #10491 )
2021-06-18 12:44:18 +03:00
yuyi
a98d644637
cgen: fix fn mut args of array ( #10493 )
2021-06-18 02:51:55 +03:00
zakuro
751f2950ea
checker: skip checking `[required]` fields for struct update syntax ( #10500 )
2021-06-18 02:51:33 +03:00
crthpl
4688c75389
cgen, parser: fix several assembly bugs ( #10498 )
2021-06-18 01:20:46 +03:00
yuyi
e31be9f5c4
checker: fix generic fn assign ( #10479 )
2021-06-16 19:17:07 +03:00
yuyi
1dca06495d
checker: implement if smartcast multi conds (part 1) ( #10477 )
2021-06-16 19:16:15 +03:00
Delyan Angelov
2f35aad8ce
ci: fix tests-sanitize-memory-clang too
2021-06-16 13:32:37 +03:00
Delyan Angelov
9dff3c36a6
ci: fix failing `Self tests` task on the `windows-msvc` job 2
2021-06-16 12:44:55 +03:00
Delyan Angelov
ed0af3fd88
ci: fix failing `Self tests` task on the `windows-msvc` job
2021-06-16 12:44:00 +03:00
Delyan Angelov
69ce8baefd
v.ast: allow for `fn f()&IAbc{return voidptr(0)}` with no additional voidptr implicit conversions to compile
2021-06-16 11:07:04 +03:00
Delyan Angelov
862c4cf371
v.checker,v.gen: allow for `&IAbc(voidptr(0))` where IAbc contains fields
2021-06-16 10:48:50 +03:00
Delyan Angelov
e7cc93a120
v.checker: allow for a `f(unsafe{voidptr(0)})` call of `fn f(x &Interface){}`
2021-06-16 09:20:01 +03:00
yuyi
ffcc6cf6d2
checker: fix `for in mut val` for floats ( #10470 )
2021-06-16 04:04:31 +03:00
yuyi
c3b9336f21
cgen: fix generic method receiver typeof name error ( #10469 )
2021-06-16 04:03:50 +03:00
yuyi
bdc8586ddd
checker, cgen: fix `for in mut val` ( #10444 )
2021-06-15 04:43:10 +03:00
Uwe Krüger
98a496d70c
tests: remove white space from file name ( #10462 )
2021-06-15 04:42:15 +03:00
Uwe Krüger
2ac39d9112
all: new function `isreftype(T)` to know if `T` contains pointers ( #10438 )
2021-06-13 06:26:13 +03:00
Delyan Angelov
e70bde54dc
ast: improve Expr.str() for `sizeof(Type)` and `__offsetof(StructName, fieldname)`, for more informative asserts/dumps
2021-06-12 16:49:14 +03:00
Alexander Medvednikov
635f045b14
ast: make is_int() work with aliases
2021-06-12 14:35:38 +03:00
yuyi
f26626117d
cgen: fix match struct type cond ( #10421 )
2021-06-11 11:58:25 +03:00
crthpl
6576d876fc
cgen: support a `[_naked]` fn attribute ( #10418 )
2021-06-11 11:03:39 +03:00
yuyi
9d852e22b2
cgen: fix match array or map cond ( #10411 )
2021-06-10 21:33:35 +03:00
Delyan Angelov
f351ff037e
Revert "checker: check generic type indexing error ( #10345 )"
...
This reverts commit 103c777ad6
.
Passing references to values should be allowed, and is already used in vinix:
`pub fn cas<T>(_here &T, _ifthis T, writethis T) bool {`
2021-06-09 11:46:17 +03:00
yuyi
103c777ad6
checker: check generic type indexing error ( #10345 )
2021-06-08 17:23:44 +03:00
yuyi
cd464010d4
cgen: fix match with multi sumtype exprs ( #10377 )
2021-06-07 14:16:30 +03:00
crthpl
8a497080b3
cgen: fix assembly in generic fns ( #10370 )
2021-06-07 10:53:33 +03:00
yuyi
114c382c46
parser: fix generic fn typeof name ( #10363 )
2021-06-06 17:40:13 +03:00
Lukas Neubert
c14b357fec
checker: fix enums in builtin ( #10366 )
2021-06-06 16:27:46 +03:00
yuyi
329a6c974e
table, checker, cgen: implement generic fn infering fixed array ( #10352 )
2021-06-06 01:11:08 +03:00
Lukas Neubert
3f00ff465b
checker: check or block inside println calls ( #10354 )
2021-06-05 23:01:58 +03:00
crthpl
9553c5a4e6
parser: fix multiple output modifiers in asm ( #10347 )
2021-06-04 23:18:11 +03:00
Ehsan Afzali
672bb6ca7f
parser: fix required function members in struct ( #10299 )
2021-06-03 02:55:58 +03:00
yuyi
b0bafa6376
cgen: fix or_block in for declaration ( #10317 )
2021-06-03 01:18:52 +03:00
Delyan Angelov
b28def7c11
tests: add vlib/v/tests/failing_tests_test.v, support `testdata` in `v test-self` too
2021-06-03 00:32:09 +03:00
Delyan Angelov
14d09aa7c2
ci: fix failing `v -cstrict vlib/v/tests/channels_test.v`
2021-06-01 16:48:49 +03:00
Delyan Angelov
5cb2683e97
v.gen.c,v.markused: fix `println(ch)` when ch is a channel
2021-06-01 13:46:59 +03:00
zakuro
0afeba5588
cgen: fix C error with clang, when declaring a fn type with an alias type argument ( #10297 )
2021-06-01 12:37:27 +03:00
Wertzui123
148bb31f6e
v.parser: allow for `if x { $if y {} } else {}`, fix #10243 ( #10294 )
2021-06-01 12:19:39 +03:00
yuyi
9fc5b9dc54
cgen: fix match in map or expr ( #10283 )
2021-05-31 17:10:33 +03:00
Uwe Krüger
d39a55ac11
checker: forbid leaving function from inside `defer` block ( #10285 )
2021-05-31 17:09:57 +03:00
Louis Schmieder
38796521fa
all: allow defer use from other scope ( #10284 )
2021-05-31 14:43:44 +03:00
yuyi
5aa4f622b6
checker: fix match expr returning optional ( #10281 )
2021-05-31 12:34:55 +03:00
Lukas Neubert
5b9256ba0b
cgen: write alias typedefs just before interfaces ( #10272 )
2021-05-31 12:26:06 +03:00
Uwe Krüger
aa861d1cac
docs: describe array/slice behaviour ( #10252 )
2021-05-30 14:48:33 +03:00
yuyi
13ddfaa433
checker: fix generic fn infer nested struct ( #10262 )
2021-05-30 14:06:52 +03:00
yuyi
e4f6369cd1
checker: fix match error to none ( #10245 )
2021-05-29 19:30:57 +03:00
yuyi
8785599094
checker, cgen: fix optional with if expr ( #10242 )
2021-05-29 10:00:12 +03:00
Lukas Neubert
6b683d31ac
v.parser: support imported enums as map keys ( #10234 )
2021-05-28 20:09:03 +03:00
yuyi
9ea753e853
checker: fix generic with fixed array parameter ( #10233 )
2021-05-28 18:51:55 +03:00
Alexander Medvednikov
ca8158ac41
parser: handle casts in match expressions; c2v: minor fixes
2021-05-28 17:59:43 +03:00
Ruofan XU
4e55b9c08e
example: improve binary search tree example ( #10226 )
2021-05-27 20:13:02 +03:00
Delyan Angelov
2b62dca000
v: support for `$if threads {}, depending on whether `go ` was used at all ( #10227 )
2021-05-27 18:36:07 +03:00
Uwe Krüger
8828054e5b
builtin: fix arrays/slices memory bug ( #10219 )
2021-05-27 15:50:06 +03:00
zakuro
607dbd36d7
parser: set is_public of TypeSymbol for fn type decl ( #10212 )
2021-05-27 10:17:08 +03:00
yuyi
7c0cd2f41d
checker, cgen: fix match with complex sumtype exprs ( #10215 )
2021-05-27 10:13:50 +03:00
yuyi
cf07375d1b
checker: fix multi types generic struct init ( #10201 )
2021-05-25 19:51:55 +03:00
yuyi
f3274700cd
cgen: fix generic struct to string ( #10191 )
2021-05-25 07:45:54 +03:00
Delyan Angelov
13d1d28db1
v.parser: fix -autofree for script mode programs that do not have explicit `fn main(){}`
2021-05-24 14:42:09 +03:00
penguindark
d8d05e0106
all: new string interpolation in pure V ( #10181 )
2021-05-24 05:20:45 +03:00
yuyi
eb5ac23988
checker: fix match expr with if expr ( fix #10177 #10178 ) ( #10179 )
2021-05-23 17:59:57 +03:00
Lukas Neubert
79b97fa361
fmt: keep names of parameters in anonymus function ( #10173 )
2021-05-23 05:54:39 +03:00
yuyi
565dbc4051
checker: fix inferring method receiver types ( #10166 )
2021-05-22 11:04:19 +03:00
yuyi
9be596ef12
checker: fix generic struct with anon fn type ( #10161 )
2021-05-21 17:21:18 +03:00
zakuro
be92f81b2e
checker: fix type error in `f<T>(fn (v T))` with multiple different Ts ( #10154 )
2021-05-21 06:13:04 +03:00
yuyi
bf69d20353
checker: fix generic struct with anon fn parameter ( #10147 )
2021-05-20 16:57:27 +03:00
Delyan Angelov
da090f91d8
cgen: fix using and auto printing `x := [16]&Type{}`
2021-05-20 15:59:02 +03:00
yuyi
492d264d08
checker: fix generic structs init ( #10134 )
2021-05-20 09:18:51 +03:00
Enzo
906b207e58
checker: deprecate using V strings in C function calls ( #10140 )
2021-05-20 09:17:44 +03:00
spaceface
9ddf1ec327
cgen: fix accessing fields in propagated optional subexpressions ( #10136 )
2021-05-19 21:28:17 +03:00
yuyi
170282b2af
checker: fix generics fn inferred structure type ( fix #10093 ) ( #10096 )
2021-05-15 12:58:33 +03:00
Uwe Krüger
7bfd89567b
shared: support `lock` on SelectorExpression ( #10105 )
2021-05-15 04:34:27 +03:00
yuyi
b728d89069
checker: fix generics with generic anon fn parameter ( #10101 )
2021-05-14 12:01:57 +03:00
crthpl
4273a9697e
parser: add support for flags in asm output constraints ( #10103 )
2021-05-14 12:01:15 +03:00
yuyi
0139836412
tests: add more generic structs tests ( #10095 )
2021-05-14 01:57:55 +03:00
zakuro
a9435f3c25
cgen: fix `cannot take rvalue` error of interface ( #10040 )
2021-05-13 17:54:48 +03:00
yuyi
14b7ce0f04
checker: fix generics fn return generics fn type ( fix #10085 ) ( #10088 )
2021-05-13 12:26:13 +03:00
Delyan Angelov
cf3dd7a51f
v.checker: fix `unused variable` warning on `*p = val`
2021-05-12 18:03:01 +03:00
crthpl
8361f714dd
cgen: fix deadlock when returning/breaking in `lock` ( #10079 )
2021-05-12 11:44:47 +03:00
Delyan Angelov
d463817f80
Revert "Revert "cgen: fix generics with generics fn type parameter ( #10078 )""
...
This reverts commit d3de91ee86
.
2021-05-11 11:14:58 +03:00
Delyan Angelov
d3de91ee86
Revert "cgen: fix generics with generics fn type parameter ( #10078 )"
...
This reverts commit e310513a5f
.
2021-05-11 10:59:55 +03:00
yuyi
e310513a5f
cgen: fix generics with generics fn type parameter ( #10078 )
2021-05-11 09:24:23 +03:00
El Koulali András
3e5a5754f3
cgen: fix constants with multi-statement C initializations ( #10058 )
2021-05-09 03:25:44 +03:00
spaceface
ef7454b5e2
checker: fix calling functions with variadic interface parameters ( #10052 )
2021-05-08 22:26:13 +03:00
yuyi
ed7c8d5e19
checker: fix generics return recursive generic struct ( fix #10028 ) ( #10031 )
2021-05-08 14:33:09 +03:00
yuyi
3dfbd2351b
checker,cgen: fix generics with generic_fn type parameter ( #10022 )
2021-05-08 14:06:56 +03:00
Delyan Angelov
8a380f4699
tools: make `v test-cleancode` test everything by default ( #10050 )
2021-05-08 13:32:29 +03:00
Uwe Krüger
d26ac5692e
all: various fixes for [heap]/auto-heap handling ( #10033 )
2021-05-07 15:58:48 +03:00
Delyan Angelov
ea74e2bc64
v.parser: add p.unique_prefix, add run_project_folders_test.v ( closes #10023 )
2021-05-06 21:14:19 +03:00
yuyi
a6764e3cc3
table: fix generics struct with anon fn fields ( #10024 )
2021-05-06 20:24:08 +03:00
Delyan Angelov
ac2eaa05c7
tests: add interface_many_named_test.v regression test ( closes #10013 )
2021-05-06 19:54:49 +03:00
Louis Schmieder
b8e070b2a1
orm: fix multi substructs ( #9941 )
2021-05-04 12:35:18 +03:00
yuyi
581fe375cc
checker: fix generics with cascaded multi nested generic fn ( fix #3815 ) ( #9965 )
2021-05-02 19:30:57 +03:00
Delyan Angelov
4b818fa2be
v: implement interface embedding ( #9935 )
2021-05-02 03:00:47 +03:00
spaceface
ef63491a8c
cgen: fix calling function-pointer fields on interfaces ( #9948 )
2021-05-01 16:45:53 +03:00
yuyi
f82f1977d1
tests: enable test_generic_fn_with_variadics() test ( #9944 )
2021-05-01 12:52:47 +03:00
yuyi
d236d6a473
parser, cgen: fix generics fn typeof name ( fix #7357 ) ( #9939 )
2021-04-30 13:40:36 +03:00
yuyi
844662e0d6
cgen: fix generics fn str() ( fix #7403 ) ( #9940 )
2021-04-30 13:40:07 +03:00
yuyi
ea0ac09297
checker: fix generics with nested external generics fn ( #9933 )
2021-04-29 17:37:54 +03:00
zakuro
191a167f42
checker: allow omitting the enum name of map key ( #9919 )
2021-04-29 08:33:41 +03:00
yuyi
c82c8059cf
tests: add recursive generics fn test ( #9907 )
2021-04-28 22:12:06 +03:00
Uwe Krüger
f4e92997f2
checker: support value array elements of `[heap]` type inside struct ref ( #9899 )
2021-04-28 07:47:00 +03:00
yuyi
9f1ac39770
checker: fix generics with anon generics fn argument ( fix #9859 ) ( #9897 )
...
* checker: fix generics with anon generics fn argument
* cgen: fix typedef of generics anon fn
* fix check generics argument types
2021-04-27 15:25:42 +03:00
Don Park
aebb551e93
cgen: do full struct initialisation for V structs, fixes invalid data from `map[string]Struct{}['unknown']` ( #9878 )
2021-04-27 08:18:48 +03:00
Uwe Krüger
787a63dab6
cgen: execute `defer` block *after* return expression is evaluated ( #9893 )
2021-04-27 01:42:16 +03:00
yuyi
3877522ee3
table,checker,cgen: fix generics with recursive generics struct ( #9862 )
2021-04-26 20:05:10 +03:00
yuyi
21d1f86ead
checker: fix generics that return reference generics struct ( fix #6218 ) ( #9869 )
2021-04-26 20:01:01 +03:00
yuyi
7ddf569de6
cgen: fix generics multi_array in ( #9885 )
2021-04-26 19:59:40 +03:00
Enzo
de8c4866a4
v.checker: fix postfix expr on generic types ( #9887 )
2021-04-26 19:57:05 +03:00
yuyi
2b43d3193b
checker: fix generics with assign generics struct ( fix #7784 ) ( #9889 )
2021-04-26 19:54:22 +03:00
yuyi
212b4fa089
parser: implement infering generic type parameters from receiver types ( fix #5862 ) ( #9870 )
2021-04-26 10:56:08 +03:00
Uwe Krüger
3c0a368af3
all: automatically move (some) referenced objects to heap ( #9873 )
2021-04-25 21:40:38 +03:00
Louis Schmieder
fc3b628440
v: support `$for attr in Test.attributes` ( #9836 )
2021-04-25 18:29:26 +03:00
zakuro
a0835ac139
checker/cgen: implement in expression for alias of array/map ( #9871 )
2021-04-25 18:17:54 +03:00
Carlos Esquerdo Bernat
42a65e1009
tests: add submodules tests ( #9640 )
2021-04-23 17:22:24 +03:00
yuyi
dd2002cc57
cgen: fix generics with multi generics struct receiver ( #9853 )
2021-04-23 15:17:57 +03:00
yuyi
8e455495b2
checker: fix generics that return multi generics struct ( #9852 )
2021-04-23 11:19:16 +03:00
yuyi
51258923d7
checker: fix generics call with reference arg ( fix #9817 #9818 ) ( #9830 )
2021-04-21 06:40:11 +03:00
Delyan Angelov
bd539b6427
vfmt: fix string interpolation formatting with multiple ',",\' and \" .
2021-04-20 20:26:06 +03:00
Delyan Angelov
d4f31412b7
v: deprecate `@VROOT` in favour of `@VMODROOT` ( #9795 )
2021-04-19 19:01:47 +03:00
spaceface
73352583e7
ci: fix all `-cstrict` warnings with gcc and clang ( #9792 )
2021-04-19 15:38:48 +03:00
yuyi
75d1b54f7b
cgen: fix empty struct init using macro ( #9787 )
2021-04-18 16:34:25 +03:00
Henrixounez
ee7bcfd05c
checker: prevent double module name prepending on generics types regi… ( #9791 )
2021-04-18 16:26:40 +03:00
涂紳騰(Shen-Teng Tu)
3c72c6abc2
parser: disable template variables in `<style>` ( #9777 )
2021-04-17 15:47:36 +03:00
yuyi
731e942055
checker: fix generics with different order of generics fn ( #9765 )
2021-04-17 08:29:06 +03:00
Uwe Krüger
1b0f099552
parser: fix handling of `-` inside array literals ( #9771 )
2021-04-17 02:37:17 +03:00
Uwe Krüger
80bd2974b4
cgen: fix iteration over `shared` map ( #9763 )
2021-04-16 14:49:14 +03:00
yuyi
8cb44ed9db
checker: fix generics with nested generics fn ( #9757 )
2021-04-16 11:53:20 +03:00
涂紳騰(Shen-Teng Tu)
d9fdae1de9
parser: escape js template literal syntax inside <script> tags ( #9738 )
2021-04-15 12:39:39 +03:00