Joe Conigliaro
|
e1c8b07fa5
|
checker/tests: format test added in prev commit & rename chekcer prop
|
2022-04-08 17:41:23 +10:00 |
Joe Conigliaro
|
8dc2601080
|
all: comptime_call - simplify tmpl scoping, solves many issues.
|
2022-04-08 17:33:24 +10:00 |
Delyan Angelov
|
5a695c81dc
|
ci: fix the recorded output for compare_structs.c.must_have after eea46c4
|
2022-04-07 18:08:56 +03:00 |
crthpl
|
b232a3b0d1
|
cgen: fix `.filter()` and `.map()` on shared arrays (#13954)
|
2022-04-07 18:05:11 +03:00 |
Delyan Angelov
|
eea46c4e1a
|
cgen: fix error, when a struct with over 8 fields, is used as a method receiver directly.
|
2022-04-07 17:20:14 +03:00 |
playX
|
6a820c2845
|
checker: allow all binary operations when translating code produced by c2v (#13964)
|
2022-04-07 12:22:24 +03:00 |
yuyi
|
e7fd8c4e7c
|
cgen: fix error for dereference mut interface in loop (fix #13913) (#13941)
|
2022-04-07 12:01:54 +03:00 |
yuyi
|
a58dde48f8
|
cgen: fix error for optional multi return (#13959)
|
2022-04-07 09:12:23 +03:00 |
yuyi
|
c9dcdf6744
|
cgen: fix json decode with optional argument (fix #13943) (#13958)
|
2022-04-06 19:34:22 +03:00 |
Delyan Angelov
|
c5d8d27b90
|
ci: fix -cstrict failures for vweb_test.v etc.
|
2022-04-06 08:54:01 +03:00 |
Vincenzo Palazzo
|
6412f8ba0b
|
checker: add a known error on alias cast with generics (#13946)
|
2022-04-05 19:09:46 +03:00 |
Vincenzo Palazzo
|
359f16fdfd
|
parser: fixed parsing prototype function with recursive type (#13922)
|
2022-04-05 18:39:49 +03:00 |
yuyi
|
0cba579a7b
|
cgen: simplify codegen for optional consts (#13948)
|
2022-04-05 17:54:23 +03:00 |
Delyan Angelov
|
2ecfd1b351
|
ci: fix clang sanitize errors for json_decode
|
2022-04-05 17:52:10 +03:00 |
Delyan Angelov
|
f5e4d17cf3
|
json: return errors with more context, on failed json.decode() calls.
|
2022-04-05 12:06:08 +03:00 |
yuyi
|
f6b8e1e13f
|
cgen: fix error for const using nested optionals (#13939)
|
2022-04-05 05:58:11 +03:00 |
Alexander Medvednikov
|
92bfd9b353
|
cgen: fixed array index for translated code
|
2022-04-04 12:09:29 +03:00 |
StunxFS
|
725b472d37
|
checker: fix typos (#13929)
|
2022-04-04 10:07:53 +03:00 |
Nick Treleaven
|
91b40304b7
|
vdoc: highlight `..`, `...` as punctuation & postfix ops as operators (#13924)
|
2022-04-04 09:21:54 +03:00 |
Alexander Medvednikov
|
719a3b5de3
|
cgen: fix fixed arrays assignment in translated code
|
2022-04-04 06:20:54 +03:00 |
Alexander Medvednikov
|
a55e930c00
|
checker: fix pointer checks in translated code
|
2022-04-04 05:35:15 +03:00 |
Alexander Medvednikov
|
cc227d8520
|
checker: fix non-numeric type check for translated code
|
2022-04-04 04:59:14 +03:00 |
Delyan Angelov
|
44603f8e59
|
checker: add suggestions for misspelled `mod.func_name()` calls
|
2022-04-03 20:07:52 +03:00 |
Vincenzo Palazzo
|
51c1d666c2
|
checker: fix operator overloads (for large structs with > 8 fields, the method receiver is normally auto converted to a reference) (#13889)
|
2022-04-03 19:30:29 +03:00 |
Delyan Angelov
|
a1e9cae5d2
|
tests: add a vlib/v/tests/known_errors/known_errors_test.v test runner
|
2022-04-03 12:54:22 +03:00 |
yuyi
|
0497b885dc
|
checker: minor cleanup in find_unreachable_statements_after_noreturn_calls() (#13903)
|
2022-04-03 11:19:19 +03:00 |
Cameron Katri
|
340543dfc0
|
cli: add automatic manpage generation with -man (#13911)
|
2022-04-03 10:12:47 +03:00 |
Nick Treleaven
|
42f92db0ab
|
v.doc: parse multi-line examples (so they get highlighted) (#13894)
|
2022-04-02 18:29:12 +03:00 |
yuyi
|
faa55b46de
|
cgen: fix array of fixed array (fix #13895) (#13901)
|
2022-04-02 18:00:59 +03:00 |
yuyi
|
0bf0c73a49
|
checker: fix error for returning optional (#13902)
|
2022-04-02 17:25:01 +03:00 |
Vincenzo Palazzo
|
d7817863c6
|
checker: type inference over a generic type should compile (#13824)
|
2022-04-01 19:31:27 +03:00 |
Delyan Angelov
|
9d2529b611
|
ci: reduce repetitions in test_global_mutex in init_global_test.v
With the old number of repetitions (2500000), that test alone could take over
30 seconds, in the CI environment.
|
2022-04-01 19:23:15 +03:00 |
yuyi
|
bc98c11d9d
|
parser, checker, cgen: minor cleanup of go_expr() (#13875)
|
2022-03-31 19:58:04 +03:00 |
yuyi
|
db3bbb58cf
|
cgen: fix error for cross assign of the reserved name variable (#13884)
|
2022-03-31 19:55:21 +03:00 |
Cameron Katri
|
b15240185e
|
builder,cgen: iOS fixes (#13883)
|
2022-03-31 11:51:13 +03:00 |
yuyi
|
ae1cb5697e
|
cgen: minor cleanup in ref_or_deref_arg() (#13874)
|
2022-03-30 21:06:38 +03:00 |
yuyi
|
d40a502981
|
checker: minor cleanup in fn_call() (#13873)
|
2022-03-30 21:05:17 +03:00 |
Delyan Angelov
|
8121a8ada0
|
ci,cgen: comment out including stdbool.h for now
Fails tcc tests on windows, see: https://github.com/vlang/v/runs/5749951315?check_suite_focus=true
and vlib/v/checker/tests/globals_run/function_stored_in_global.vv
|
2022-03-30 14:26:20 +03:00 |
Delyan Angelov
|
566735b298
|
cgen: add `nil` to c_reserved (it is a macro defined in MacTypes.h on macos)
|
2022-03-30 13:33:03 +03:00 |
Cameron Katri
|
093994655c
|
v.builder: fix iOS compilation from non-macOS, allow -cc to override the default cross compiler (#13866)
|
2022-03-30 10:26:13 +03:00 |
Cameron Katri
|
3e69d3813b
|
v.builder: fix linker flags for systems with Procursus (#13865)
|
2022-03-30 10:15:52 +03:00 |
Delyan Angelov
|
cc637e5ee8
|
checker: make the misssing shared/mut modifer in fn and method calls error clearer
|
2022-03-30 01:45:40 +03:00 |
yuyi
|
55d9464890
|
checker: fix error for marking as referenced (#13859)
|
2022-03-30 01:33:10 +03:00 |
yuyi
|
42a67831bf
|
parser: fix printing slice of multiline raw string (#13856)
|
2022-03-29 18:06:11 +03:00 |
yuyi
|
c71770d9c5
|
checker: fix error for array of anon fn call (#13858)
|
2022-03-29 18:04:30 +03:00 |
Delyan Angelov
|
7ee93c8a20
|
docs: show the full information for deprecated functions
|
2022-03-29 15:17:55 +03:00 |
yuyi
|
fd34ebd84e
|
checker: check the count of generics in fn arguments (#13855)
|
2022-03-29 10:04:19 +03:00 |
yuyi
|
509367b293
|
cgen: minor cleanup in expr_is_multi_return_call() (#13846)
|
2022-03-28 20:38:23 +03:00 |
yuyi
|
dd1a8cbadc
|
parser: check error for struct field type using 'mut' (#13847)
|
2022-03-28 18:13:38 +03:00 |
yuyi
|
62553dcc2e
|
cgen: fix crash for casting bool to int (fix #13825) (#13844)
|
2022-03-28 12:20:47 +03:00 |
Subhomoy Haldar
|
f75ce9dd82
|
rand: move functions from rand.util to the main module (#13840)
|
2022-03-27 17:38:59 +03:00 |
yuyi
|
875ad1f6ea
|
ast: minor cleanup in ast.v (#13839)
|
2022-03-27 16:21:40 +03:00 |
Delyan Angelov
|
0e496a8de2
|
tests: add an autofree regression test before return value ownership changes
|
2022-03-27 09:50:37 +03:00 |
Delyan Angelov
|
bea0d500d0
|
parser: ignore upper letter case restriction for `fn C.xyz` declarations
|
2022-03-26 21:20:28 +02:00 |
Nick Treleaven
|
fcb57312b9
|
parser: error if parameter name starts with a capital (#13827)
|
2022-03-26 19:56:34 +02:00 |
Delyan Angelov
|
7f28d91190
|
ci: fix again -usecache regression on macos
|
2022-03-26 09:47:44 +02:00 |
Alexander Medvednikov
|
0248349e7c
|
cgen: global/const fixes
|
2022-03-25 23:33:01 +03:00 |
Delyan Angelov
|
347db755c8
|
tests: sort the test files before further processing in valgrind_test.v
|
2022-03-25 09:41:45 +02:00 |
Delyan Angelov
|
ddc2c49365
|
cgen: autofree out of scope variables in reverse order of their creation
|
2022-03-25 09:39:12 +02:00 |
Nick Treleaven
|
a4ab3c1f14
|
checker: disallow `mut_ptr = &immutable_var` (#13814)
|
2022-03-24 20:43:25 +02:00 |
Delyan Angelov
|
9bbb52e9cc
|
checker: add a check for `dump(c)`, where `typeof(c) == "char"`
|
2022-03-24 12:11:59 +02:00 |
yuyi
|
78d9975798
|
ast, cgen: restore Type.str() and fix error for it (#13815)
|
2022-03-24 11:45:06 +02:00 |
yuyi
|
1566f7f766
|
checker: minor cleanup in check_types.v (#13816)
|
2022-03-24 08:59:05 +02:00 |
yuyi
|
35cd8112a5
|
ast, checker, cgen: fix error for printing alias that has str method (#13809)
|
2022-03-23 11:52:48 +02:00 |
Vincenzo Palazzo
|
8b072aa962
|
checker: check if generic values have the same types (#13718)
|
2022-03-23 09:13:10 +02:00 |
yuyi
|
dff39bac78
|
cgen: fix error for defining global anonymous functions (#13808)
|
2022-03-23 08:09:15 +02:00 |
yuyi
|
0337882240
|
checker: check redefine global 'main' function (#13803)
|
2022-03-22 17:39:12 +02:00 |
yuyi
|
a9837ba95d
|
cgen: minor cleanup in go_expr() (#13801)
|
2022-03-22 12:07:46 +02:00 |
yuyi
|
56f5ed4789
|
strconv: fix error for string interpolation of float format (#13800)
|
2022-03-22 12:00:18 +02:00 |
yuyi
|
f66d2f5d43
|
cgen: simplify in index_of_array() and add test (#13792)
|
2022-03-21 22:03:45 +02:00 |
Delyan Angelov
|
381cf4b61d
|
ci: bump retries to 3, for flaky vlib/v/tests/go_array_wait_test.v
|
2022-03-21 21:47:01 +02:00 |
yuyi
|
c0437afbcd
|
cgen: fix error for casting int to interface (#13790)
|
2022-03-21 21:18:11 +02:00 |
yuyi
|
5815ab8d00
|
cgen: minor cleanup in index.v (#13788)
|
2022-03-21 13:10:10 +02:00 |
yuyi
|
81bb1ea71f
|
tests: cleanup go_anon_fn_variable_call_test.v (#13786)
|
2022-03-21 13:04:43 +02:00 |
El Koulali András
|
f5036629ca
|
cgen: add `true` and `false` to C reserved words (#13781)
|
2022-03-21 11:00:30 +02:00 |
yuyi
|
d9cca53bd0
|
checker: check error for index of optional (#13785)
|
2022-03-21 10:17:57 +02:00 |
Delyan Angelov
|
21e9b1deb0
|
ci: fix -usecache failure on macos
|
2022-03-21 08:52:25 +02:00 |
Alexander Medvednikov
|
80c94ea73e
|
cgen: fix c2v consts in .o files
|
2022-03-21 04:56:37 +03:00 |
yuyi
|
c4b424717c
|
cgen: fix error for map get anon fn value (#13782)
|
2022-03-21 00:20:55 +02:00 |
Delyan Angelov
|
caa0e25939
|
cgen: fix struct type dependency sorting, when struct field types, are aliases to struct types from other modules (#13779)
|
2022-03-20 20:23:48 +02: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
|
3e40cd5baa
|
ast, checker, cgen: fix error for go anon fn variable call (#13776)
|
2022-03-20 07:45:23 +02:00 |
Delyan Angelov
|
c05634ebd1
|
ci: fix sanitize job failures after 02b889d
|
2022-03-19 21:45:58 +02:00 |
Delyan Angelov
|
02b889dac3
|
cgen: generate smaller switch statements for sumtypes/enums with else{}
|
2022-03-19 21:12:27 +02:00 |
Delyan Angelov
|
eb7c9cec3d
|
parser: short circuit if conditions in Parser.name_expr
|
2022-03-19 20:31:03 +02:00 |
Delyan Angelov
|
4dd68d3965
|
ast: small cleanup of using simple string interpolation in a string builder .write_string/1 parameter
|
2022-03-19 17:25:53 +02:00 |
Delyan Angelov
|
0cc63107ff
|
cgen: fix duplicate auto generation of free methods, add test
|
2022-03-19 01:01:08 +02:00 |
yuyi
|
5237d1d446
|
cgen: fix error for empty interface (#13764)
|
2022-03-18 22:41:06 +02:00 |
yuyi
|
3e41be1ff4
|
checker: minor cleanup in check_or_last_stmt() (#13763)
|
2022-03-18 22:27:53 +02:00 |
Delyan Angelov
|
1734e72638
|
v.vmod: make the v.mod parser more robust, show line numbers in errors, add tests
|
2022-03-18 22:23:11 +02:00 |
yuyi
|
5f79fa8a30
|
checker: handle invalid smartcast with if/match none ident or selector (fix #12317) (#13762)
|
2022-03-18 17:50:54 +03:00 |
Nick Treleaven
|
f903ef24e8
|
cgen: simplify slicing fixed array (#13767)
|
2022-03-18 17:50:30 +03:00 |
yuyi
|
bb2ddb98a3
|
parser: check if guard condition (#13765)
|
2022-03-18 17:49:20 +03:00 |
Delyan Angelov
|
0ca87ad09f
|
parser: fix small performance regression after 1d83ab6b (by avoiding needless interpolation in hot paths)
|
2022-03-18 12:52:03 +02:00 |
Delyan Angelov
|
817bedec5d
|
checker: show available sumtype variants in match branches on typos
|
2022-03-18 11:50:28 +02:00 |
Nick Treleaven
|
00563a130d
|
cgen: fix double evaluation of rvalue array expression in slice (#13737)
|
2022-03-18 11:43:15 +02:00 |
yuyi
|
136f39a2d4
|
cgen: cleanup in if_expr() (#13754)
|
2022-03-17 01:09:49 +02:00 |
Delyan Angelov
|
7a4715288c
|
checker: make the errors for call expression shared/mut mismatches more detailed
|
2022-03-16 22:45:35 +02:00 |
yuyi
|
7f62346213
|
cgen: fix error for if expr returning sumtype (#13752)
|
2022-03-16 15:43:17 +02:00 |
yuyi
|
315e07abf6
|
checker: minor cleanup in match_expr() (#13753)
|
2022-03-16 15:39:57 +02:00 |
yuyi
|
33167960ed
|
checker: check the sumtype mismatch returned by match expr (#13751)
|
2022-03-16 09:31:38 +02:00 |
yuyi
|
57cba4d3f0
|
ast: minor cleanup in is_blank_ident() (#13748)
|
2022-03-16 09:30:37 +02:00 |
yuyi
|
49155ec312
|
parser: notice unnecessary parenthesis of reference (fix #11179) (#13739)
|
2022-03-15 16:11:53 +02:00 |
yuyi
|
92cafd8851
|
checker: check invalid 'mut' keyword in infix expr (#13742)
|
2022-03-15 14:50:17 +03:00 |
yuyi
|
1d83ab6be1
|
parser: check using invalid keyword with none ident (#13743)
|
2022-03-15 12:58:03 +02:00 |
Nick Treleaven
|
34dd4f34ab
|
checker: fix cgen error on sliced references (#13736)
|
2022-03-14 19:52:37 +02:00 |
yuyi
|
ea3c0166c0
|
ast: fix error for typeof aggregate (#13735)
|
2022-03-14 18:42:47 +02:00 |
yuyi
|
dbb18e3656
|
parser: fix error for match branch with array expression (#13733)
|
2022-03-14 16:19:05 +02:00 |
pancake
|
a1d0db792e
|
native: initial support for typeof() expressions (#13730)
|
2022-03-14 15:15:06 +02:00 |
playX
|
c8b0f51c13
|
builtin.wasm_bare: use walloc as malloc/free implementation (#13731)
|
2022-03-14 09:20:20 +02:00 |
yuyi
|
f7feb634d2
|
checker: fix error for if mut with immutable variable (#13728)
|
2022-03-13 16:33:50 +02:00 |
yuyi
|
27f9bc9ba0
|
checker: check error for match mut with immutable variable (fix #9704 #8976) (#13725)
|
2022-03-13 09:53:29 +02:00 |
Delyan Angelov
|
83762fa4a4
|
native: align the disassembly/comment column in the `-v -b native` output
|
2022-03-12 11:09:09 +02:00 |
yuyi
|
795fe5844c
|
strconv: fix strconv.v_printf() (#13716)
|
2022-03-11 17:00:57 +02:00 |
yuyi
|
10ab758aa7
|
ast: minor cleanup in pref_arch_to_table_language() (#13714)
|
2022-03-11 14:56:48 +02:00 |
yuyi
|
1993bf2a12
|
parser: cleanup map syntax (#13713)
|
2022-03-11 12:15:52 +03:00 |
yuyi
|
c1c3ae2a18
|
parser: minor cleanup in fn_args() (#13711)
|
2022-03-11 10:42:03 +02:00 |
yuyi
|
3f351036a2
|
parser: fix error for fn with type only argument (fix #13704) (#13709)
|
2022-03-10 22:52:06 +02:00 |
yuyi
|
dd06698ee3
|
ast: rename TypeSymbol.is_public to TypeSymbol.is_pub (#13710)
|
2022-03-10 22:18:57 +02:00 |
Delyan Angelov
|
f3388df577
|
ci: fix dump_expression.vv when v is actually vprod (-‸ლ)
|
2022-03-10 18:13:00 +02:00 |
Delyan Angelov
|
e8c8f0e7c0
|
v.ast: fix `dump(os.real_path(Makefile))` printing `main.os.real_path`
|
2022-03-10 11:24:46 +02:00 |
Nick Treleaven
|
7231a3f135
|
vlib: add `mut` for the first parameter of builtin.copy, arrays.copy and crypto (#13702)
|
2022-03-09 20:26:00 +02:00 |
yuyi
|
4c33003f86
|
checker: check error for infix compare optional (#13701)
|
2022-03-09 20:20:21 +02:00 |
yuyi
|
6c7243f2f7
|
checker: remove redundant 'c.expected_type = ast.void_type' (#13687)
|
2022-03-09 12:33:23 +02:00 |
pancake
|
3f1e232c9b
|
native: support comparing two idents and avoid printing idents (#13686)
|
2022-03-08 19:52:30 +02:00 |
yuyi
|
3fe8204062
|
checker: fix if expr with enum value (#13685)
|
2022-03-08 11:55:17 +02:00 |
Delyan Angelov
|
f6aba9a3fe
|
util: make check_module_is_installed more robust to ~/.vmodules paths with spaces
|
2022-03-08 11:33:03 +02:00 |
yuyi
|
cea3149369
|
checker: fix match expr with enum type value (#13683)
|
2022-03-08 09:50:17 +02:00 |
Delyan Angelov
|
beb1b8ce1b
|
tools: add `v scan file.v`
|
2022-03-07 18:25:38 +02:00 |
pancake
|
b20c911d3e
|
native: generate relocatable ELFs and support relative strings (#13671)
|
2022-03-07 18:24:01 +02:00 |
yuyi
|
e6270b05dc
|
checker: check unsigned integer compared with negative value (#13670)
|
2022-03-07 10:26:40 +02:00 |
Alexander Medvednikov
|
36ec47cd20
|
all: replace "NB:" with "Note:" (docs/comments)
|
2022-03-06 20:01:22 +03:00 |
yuyi
|
c8e33ad219
|
cgen: fix error for array of reference auto_str (#13665)
|
2022-03-06 12:15:31 +02:00 |
yuyi
|
6380b9eb15
|
cgen: minor cleanup of struct.v (#13661)
|
2022-03-05 17:19:20 +02:00 |
yuyi
|
22fda7c3dd
|
cgen: fix error for time struct init with update (#13660)
|
2022-03-05 13:28:48 +02:00 |
yuyi
|
8136157f87
|
checker: fix error for 'or expr with nested match expr' (#13658)
|
2022-03-05 13:06:08 +02:00 |
yuyi
|
f70e5bd69b
|
parser: check assign expr with undefined variable (#13653)
|
2022-03-04 10:33:14 +02:00 |
ChAoS_UnItY
|
63b41e67fa
|
v.parser: change body_start_pos to function declaration's lcbr, resolve #13642 (#13646)
|
2022-03-03 19:51:27 +02:00 |
Delyan Angelov
|
4331d6dea0
|
v.builder: only add /DEBUG:FULL when -cflags does NOT contain custom /DEBUG options (#13643)
|
2022-03-03 16:47:41 +02:00 |
yuyi
|
a98eebde7f
|
checker: add a notice for potentially incorrect smartcasts (#13644)
|
2022-03-03 16:36:40 +02:00 |
yuyi
|
ac1b31dbba
|
checker: fix error for array of interface init in for_in (#13636)
|
2022-03-03 12:32:55 +02:00 |
Delyan Angelov
|
3364f2aadf
|
cgen: use ADDR for sumtype conversion instead of HEAP (fix regression after 7f8f571 )
|
2022-03-03 11:44:24 +02:00 |
yuyi
|
288b13b51d
|
all: cleanup smartcasts in the compiler (#13639)
|
2022-03-03 10:48:31 +02:00 |
Delyan Angelov
|
4e7db5bab0
|
v.builder: streamline get_os_cflags/0, use pref.os_from_string to centralise string -> v.pref.OS conversion
|
2022-03-03 10:43:50 +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
|
36e80266e6
|
ast: fix error for 'for smartcast' - part 2 (#13635)
|
2022-03-02 16:01:20 +02:00 |
yuyi
|
ffe6ff3cc8
|
cgen: fix error for print smartcast variable (#13634)
|
2022-03-02 12:32:54 +02:00 |
yuyi
|
22017ff8f4
|
parser: fix error for 'for smartcast' - part 1 (#13629)
|
2022-03-02 12:18:03 +02:00 |
yuyi
|
7f8f571ed2
|
cgen: fix error for optional cast to interface (#13623)
|
2022-03-01 19:21:55 +02:00 |
Delyan Angelov
|
fd91811fe2
|
v.util: add set_source_for_path/2 to enable external tools to use util.formatted_error on pathless sources
|
2022-03-01 18:55:25 +02:00 |
yuyi
|
996bd41ce8
|
checker: simplify for smartcast in for_stmt() (#13619)
|
2022-03-01 12:31:48 +02:00 |
Joe Conigliaro
|
3b6e122d9d
|
all: comptime_call - update tmpl scope vars with caller scope vars after their properties got updated in checker
|
2022-03-01 02:13:29 +11:00 |
yuyi
|
0028e557f9
|
checker: cleanup smartcast in checker.v (#13618)
|
2022-02-28 17:06:37 +02:00 |
yuyi
|
9a2df0df0e
|
cgen: fix fn mut argument of interface type (#13616)
|
2022-02-28 13:31:04 +02:00 |
yuyi
|
013589e9fe
|
parser: minor cleanup in global_decl() (#13617)
|
2022-02-28 13:30:17 +02:00 |
yuyi
|
efeb3e04da
|
ast: add table.is_sumtype_or_in_variant() (#13615)
|
2022-02-28 11:38:20 +03:00 |
yuyi
|
81c787ef91
|
checker: fix match expr with assign sumtype variable (#13614)
|
2022-02-28 11:37:59 +03:00 |
yuyi
|
bc16c61f6f
|
parser: check using 'mut' on fn_decl return type (#13610)
|
2022-02-27 14:23:43 +02:00 |
yuyi
|
0fb1eaef04
|
parser: check the redefinition of built-in IError (#13606)
|
2022-02-26 09:52:40 +02:00 |
yuyi
|
0d9792bdf2
|
ast: cleanup in find_method_with_generic_parent() (#13600)
|
2022-02-26 02:11:56 +03:00 |
Larpon
|
d80f5165dd
|
fmt: keep trailing comments after fn header decl (#13596)
|
2022-02-25 16:36:48 +03:00 |
yuyi
|
83ea97b1a3
|
parser: fix optional expr with array value (#13599)
|
2022-02-25 15:54:12 +03:00 |
Larpon
|
73f931b52e
|
fmt: improve single line const comment placement (#13595)
|
2022-02-25 14:46:12 +02:00 |
yuyi
|
d30ad344e8
|
checker: check error for array of sumtype appendding (#13593)
|
2022-02-24 11:07:03 +02:00 |
yuyi
|
a28249c119
|
ast: fix for in iterator of generic struct (fix #13579) (#13585)
|
2022-02-24 10:48:52 +02:00 |
Subhomoy Haldar
|
114a341f5f
|
rand: simplify rand.PRNG, move to optional types for error handling (#13570)
|
2022-02-23 12:36:14 +02:00 |
yuyi
|
b5e7cef1b1
|
ast: define 'const invalid_type_idx = -1' (#13573)
|
2022-02-23 11:54:43 +03:00 |
yuyi
|
c3ec738126
|
checker: check struct field reference type mismatch (#13575)
|
2022-02-23 11:53:22 +03:00 |
yuyi
|
6486fffc5a
|
checker: cleanup `map = {}` processing (#13563)
|
2022-02-22 16:04:54 +02:00 |
Larpon
|
1032cf5c04
|
checker: only cast as ast.Var if not unresolved, fixes #13561 (#13562)
|
2022-02-22 15:23:15 +02:00 |
Delyan Angelov
|
4a765bc33b
|
cgen: support `-d trace_gen_source_line_info`
|
2022-02-21 23:04:10 +02:00 |
yuyi
|
07e9ed1a1d
|
cgen: fix interface embedding method call (#13553)
|
2022-02-21 17:49:38 +02:00 |
playX
|
b842e89acc
|
all: initial implementation of compile-time types (#13549)
|
2022-02-21 17:42:54 +02:00 |
yuyi
|
83cdd8bedd
|
ast: add comments for struct 'StructInit' and 'StructInitField' (#13551)
|
2022-02-21 12:48:53 +02:00 |
yuyi
|
04654ed518
|
parser: check error for defer propagate (fix #13534) (#13536)
|
2022-02-20 12:29:08 +02:00 |
yuyi
|
75ebac006d
|
cgen: fix struct init with multi nested embed update expr (#13529)
|
2022-02-19 20:46:44 +02:00 |
yuyi
|
09f08e1fee
|
cgen: fix error for interface and embedded struct build (#13530)
|
2022-02-19 20:43:40 +02:00 |
eyun
|
67e33bf9bc
|
checker: make public the valid_comptime_if_os list (#13518)
|
2022-02-19 15:22:33 +02:00 |
yuyi
|
0236931c78
|
cgen: fix generics with reference generic arguments (#13525)
|
2022-02-19 15:19:50 +02:00 |
Dialga
|
bcc4de19fc
|
v.builder: fix cross compiling directory with spaces (#13522)
|
2022-02-19 10:08:41 +02:00 |
yuyi
|
0208e9672d
|
checker: check array sort_with_compare callback function parameters (#13511)
|
2022-02-19 10:06:36 +02:00 |
Delyan Angelov
|
3c38abc56e
|
rand: fix rand.uuid_v4()'s clock_seq_hi_and_reserved field
|
2022-02-18 12:43:38 +02:00 |
yuyi
|
14073ac0fe
|
checker: fix error for array of sumtype init (#13501)
|
2022-02-18 11:47:24 +02:00 |
Joe Conigliaro
|
f4051e0252
|
checker: make sure generic struct instantiation uses a known type. closes #13506
|
2022-02-18 17:54:52 +11:00 |
Joe Conigliaro
|
d739abbb3f
|
cgen: move var decl out of loop in global_decl()
|
2022-02-18 00:42:54 +11:00 |
Joe Conigliaro
|
07b15a209a
|
cgen: fix for prev commit - get usecache working with clang (fix duplicate symbols)
|
2022-02-17 22:24:58 +11:00 |
Joe Conigliaro
|
6fc654821f
|
cgen: get usecache working with clang (fix duplicate symbols)
|
2022-02-17 22:17:07 +11: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 |
yuyi
|
4f9039991f
|
parser: cleanup in check_undefined_variables() (#13496)
|
2022-02-17 10:16:52 +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
|
842fd7a27e
|
parser: check assign expr with undefined variables of struct_init (#13495)
|
2022-02-17 10:21:03 +03:00 |
Delyan Angelov
|
89b99ad4c3
|
scanner: remove the restriction for \x00 in strings (#13493)
|
2022-02-16 23:41:05 +02:00 |
Tarcisio Gruppi
|
f68144774d
|
fmt: fix map missing a comma after enum keys, leading to non parsable code (#13481)
|
2022-02-16 21:08:29 +02:00 |
yuyi
|
f8b8950b96
|
checker: check mut interface arguments (#13479)
|
2022-02-16 11:53:41 +02:00 |
Alexander Medvednikov
|
5a14748e7c
|
cgen: c2v enum fix
|
2022-02-16 12:05:32 +03:00 |
vyrus001
|
d4fc8601e0
|
builder: fix clang failing to link on windows due to an -ftlo error (#13470)
|
2022-02-16 09:13:26 +02:00 |
Delyan Angelov
|
d25652fbcf
|
parser, ast: support -d for trace_rewrite_already_registered_symbol, trace_register_sym, trace_parse_stmt, trace_parse_comptime, trace_parse_text, trace_parse_file, trace_parse_vet_file
|
2022-02-15 13:20:40 +02:00 |
yuyi
|
fb3dd82400
|
cgen: fix interface embedding complex cases (#13472)
|
2022-02-15 12:41:40 +02:00 |
yuyi
|
f9fc136c24
|
all: rename InterfaceDecl.ifaces to InterfaceDecl.embeds (#13475)
|
2022-02-15 11:17:39 +02:00 |
crthpl
|
e23db2f9b7
|
cgen: fix autogen free method for struct with shared field (#13469)
|
2022-02-15 03:55:06 +02:00 |
yuyi
|
dc0b0c83c6
|
ast: fix error for interface embedding call (#13466)
|
2022-02-14 19:22:44 +02:00 |
Delyan Angelov
|
f8bf3db568
|
markused: always include slice_ni & substr_ni too (support s#[] and a#[] in -skip-unused)
|
2022-02-14 19:05:30 +02:00 |
yuyi
|
8119a297f7
|
ast: fix error for 'struct embed is interface' (#13465)
|
2022-02-14 13:43:36 +02: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 |
yuyi
|
2e0f8ee9e2
|
ast: fix error for struct embedding with interface (#13457)
|
2022-02-14 02:33:47 +02:00 |
yuyi
|
5071a54b99
|
cgen: split up into for.v, match.v, struct.v (#13454)
|
2022-02-13 07:52:49 +03:00 |
yuyi
|
b5379255da
|
checker, cgen: fix error for struct embed with fn type (#13450)
|
2022-02-12 20:55:40 +02:00 |
Delyan Angelov
|
799c95dc4e
|
tests: filter test_ fns with params from the list of automatically run test functions (fix #13443)
|
2022-02-12 17:30:20 +02:00 |
Delyan Angelov
|
11a0df5bee
|
tests: rename struct_with_reference_alias_field.v to struct_with_reference_alias_field_test.v
|
2022-02-12 15:29:22 +02:00 |
crthpl
|
0eee012ae9
|
cgen: fix `x in shared_map` (#13442)
|
2022-02-12 11:55:25 +02:00 |
Tim Basel
|
37c151efe5
|
docs, builtin, encoding.csv: update error implementations (#13440)
|
2022-02-12 11:54:10 +02:00 |
yuyi
|
ae0e90f5d8
|
cgen: fix struct init with embed field update (#13444)
|
2022-02-12 08:16:51 +03: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 |
Vincenzo Palazzo
|
61024d4b75
|
repl: support aliased module imports too (#13423)
|
2022-02-11 15:03:14 +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 |
Vincenzo Palazzo
|
7f29418c63
|
strconv: change atof64 to return an error, if the parsed value is not a valid number (#13424)
|
2022-02-10 13:27:32 +02:00 |
Delyan Angelov
|
9ed18efa53
|
checker: error on redefining any of the public builtin functions, not just ['print', 'println', 'eprint', 'eprintln', 'isnil', 'panic', 'exit'] (#13419)
|
2022-02-10 12:26:30 +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 |
Delyan Angelov
|
356ccf247f
|
cgen: add an earlier error, to pin point the use of closures on windows
|
2022-02-09 08:35:11 +02:00 |
Vincenzo Palazzo
|
10dcb2e0d9
|
parser: allow embedding interfaces from other modules (#13385)
|
2022-02-07 00:20:34 +02:00 |
Delyan Angelov
|
191e99c248
|
v.doc: use the .parse_comments mode, instead of the older .toplevel_comments (the scanner/parser is now more robust)
|
2022-02-06 23:49:21 +02:00 |
Vincenzo Palazzo
|
d46ac40758
|
checker: add error for assigning `none` values (#13383)
|
2022-02-06 16:08:23 +02:00 |
div72
|
939bc9f26f
|
v.parser: fix compilation of normal .v files with -translated (#13363)
|
2022-02-06 12:53:20 +02:00 |
yuyi
|
ece73836aa
|
cgen: fix error for struct with reference alias field (#13380)
|
2022-02-06 10:52:36 +02:00 |
Vincenzo Palazzo
|
4e13ee22e9
|
repl: reproduce the void print function error (#13372)
|
2022-02-06 08:05:25 +02:00 |
Alexander Medvednikov
|
f23d2c8cf4
|
cgen: c2v variadic fixes
|
2022-02-06 03:36:38 +03:00 |
div72
|
cec7e91714
|
v.parser, v.checker, v.gen: add support for [translated] tag (#13373)
|
2022-02-06 00:16:02 +02:00 |
Delyan Angelov
|
5faabe7464
|
Revert "cgen: fix error for struct with reference alias fields (#13374)"
This reverts commit 4d485ae687 .
|
2022-02-05 18:52:37 +02:00 |
yuyi
|
4d485ae687
|
cgen: fix error for struct with reference alias fields (#13374)
|
2022-02-05 18:23:54 +02:00 |
yuyi
|
173b4652fb
|
parser: check orm sql statements, using undefined variables in where expr (fix #13367) (#13368)
|
2022-02-05 11:32:41 +02:00 |
Vincenzo Palazzo
|
c9a8d6448d
|
fmt: preserve formatting with comments in a empty map (#13362)
|
2022-02-05 10:05:35 +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
|
a054f868a0
|
v.util: use a normalised relative file path in the error messages with /, even on windows, to make the compiler error tests more robust
|
2022-02-04 17:56:08 +02:00 |
yuyi
|
a61b4809dc
|
ast, parser, checker: fix generic struct init with inconsistent generic types (#13359)
|
2022-02-04 14:24:38 +02:00 |
Delyan Angelov
|
85d36ed231
|
checker: stricter type casting error messages
|
2022-02-03 14:18:30 +02:00 |
yuyi
|
be1e40dac0
|
cgen: fix error for sql statement inside fn call (fix #13330) (#13346)
|
2022-02-02 18:05:31 +02:00 |
crthpl
|
c0c07db7cc
|
cgen: fix struct field init from shared struct field (#13343)
|
2022-02-02 10:55:57 +02:00 |
yuyi
|
b10b65e134
|
cgen: fix error for interface with multi-nested embed struct (#13345)
|
2022-02-02 09:11:29 +02:00 |
Delyan Angelov
|
d8cce0a71d
|
ci: fix cgen for interface_struct_with_multi_nested_embed_test.v for gcc/clang
|
2022-02-01 17:12:15 +02:00 |
yuyi
|
a014844050
|
cgen: fix error for interface with multi nested embed structs (fix #13331) (#13336)
|
2022-02-01 14:50:12 +02:00 |
yuyi
|
b34860e39b
|
ast, checker: fix error for calling complex nested generic type function (fix #13025) (#13328)
|
2022-01-31 13:00:27 +02:00 |
Delyan Angelov
|
46a096b95d
|
Revert "v.util: make mod_path_to_full_name more robust"
This reverts commit b11ce91141 .
|
2022-01-31 06:57:50 +02:00 |
Delyan Angelov
|
b11ce91141
|
v.util: make mod_path_to_full_name more robust
|
2022-01-30 22:26:36 +02:00 |
Delyan Angelov
|
f6cb772347
|
v.util: prepare for removing vlib/v/util/module.v - improve tracing, comment edge cases with actual data
|
2022-01-30 15:08:33 +02:00 |
Benjamin Stigsen
|
ceb05b163a
|
strings: rename Builder.write_b() to Builder.write_byte(), add deprecation (#13313)
|
2022-01-28 20:34:44 +02:00 |
Delyan Angelov
|
71d98717dc
|
checker: small cleanup of commit edc6c9e
|
2022-01-28 11:03:15 +02:00 |