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

11171 Commits

Author SHA1 Message Date
yuyi
25b8ae2189
parser: minor cleanup in comptime.v (#16338) 2022-11-06 08:23:28 +03:00
pancake
e3fed4c3eb
v.pkgconfig: fix infinite recursion bug when parsing dependencies (#16342) 2022-11-06 08:22:50 +03:00
Swastik Baranwal
ca484430e0
checker: check int overflow for const vars (#16332) 2022-11-06 08:22:28 +03:00
yuyi
d701cf561c
scanner: fix new string interpolation: print('{n:10}') (fix #16321) (#16325) 2022-11-06 08:20:21 +03:00
Delyan Angelov
056f1b7c06
parser: improve error message for fn (a Foo<Foo<T>>) baz(){} 2022-11-05 19:58:22 +02:00
Delyan Angelov
27d8f2371d
ci: fix go->spawn in the examples in vlib/context/README.md too 2022-11-05 14:02:24 +02:00
Delyan Angelov
bf00e9bdb8
tests: fix vlib/v/fmt/tests/*_expected.vv files too 2022-11-05 11:30:49 +02:00
Alexander Medvednikov
02acb8433c tests: fix keep tests with spawn 2022-11-05 12:13:20 +03:00
Alexander Medvednikov
e81e0ac708 fmt: replace go with spawn 2022-11-05 10:46:40 +03:00
Alexander Medvednikov
a082328e40 parser: make spawn behave like go 2022-11-05 10:41:30 +03:00
Alexander Medvednikov
141c404d45 all: new keyword "spawn" 2022-11-05 09:43:38 +03:00
Delyan Angelov
b52b8429d4
vfmt: implement support for // vfmt off and // vfmt on, with it, v fmt -w . now works. (#16335) 2022-11-05 09:08:01 +03:00
yuyi
131d07aede
parser: fix embed file to_string() in if guard (#16334) 2022-11-05 09:05:38 +03:00
penguindark
eb0c46e13a
regex: fix for last group with OR inside (#16324) 2022-11-04 08:19:33 +02:00
yuyi
fd4045931a
scanner: fix the new string interpolation - println('{s == 'hello'}') (fix #16318) (#16319)
* scanner: fix the new string interpolation - println('{s == 'hello'}')

* fix vlib/v/eval/gen/infix_gen.v
2022-11-03 23:06:11 +02:00
shove
0e8d148fe7
checker: give a checker error message on print(1), print(2) (fix #16311) (#16314) 2022-11-03 17:28:59 +02:00
Taegon Kim
962d0babdc
js: fix match true {} in the js backend (#16317) 2022-11-03 17:25:45 +02:00
yuyi
a979b3aab8
scanner: fix new string interpolation - print('{a}{{b}}') (#16309) 2022-11-03 14:04:41 +02:00
shove
fa4a45d37f
all: make fmt support two kinds of interpolation at the same time. (#16308) 2022-11-03 13:32:07 +02:00
shove
5c7ceb16dd
checker: fix the check of types not implemented by interfaces in infix key_is and not_is (fix #16282 #16298) (#16284) 2022-11-03 12:18:30 +02:00
Taegon Kim
14f90b1196
cgen: fix compile time reflection for method types (.typ was always 0) (#16310) 2022-11-03 12:16:01 +02:00
Delyan Angelov
f427a5241a
os,tools: add os.vtmp_dir()
Use it to consistently place all temporary files created by tests in a overridable folder specific to the user, that is easy to cleanup later.

NOTE: os.temp_dir() on macos returns `/tmp`, and using `/tmp/v` is a problem when multiple unix users are trying to access/create/write to it.
2022-11-03 10:19:51 +02:00
shove
dddcf423db
all: replace x[x.len-1] with x.last() (#16296) 2022-11-02 21:08:33 +02:00
Taegon Kim
d4c83f62b2
doc: fix a broken example in json2's README.md (#16293) 2022-11-02 19:29:43 +02:00
shove
5fe4888874
parser: fix raw string as map keys (fix #16285) (#16289) 2022-11-02 16:04:22 +02:00
Spydr
075c025999
native: don't generate duplicate strings (#16281) 2022-11-02 15:48:25 +02:00
shove
0fa6f60fac
cgen: fix call method with an empty args on an interface with variadic (fix #16286) (#16290) 2022-11-02 15:45:39 +02:00
yuyi
4e05e07b94
checker: check undefined ident in closure anon fn (fix #16274) (#16278) 2022-11-02 15:41:44 +02:00
yuyi
54b6b43922
cgen: fix dump(none) (#16287) 2022-11-02 14:21:28 +02:00
shove
e5d1881e1a
checker: fix multiple pointer check of fn and method args (fix #16261 #16262 #16263) (#16275) 2022-11-01 19:05:34 +02:00
Delyan Angelov
968435fca6
toml: clearly mark the workaround [manualfree] tags with [autofree_bug; manualfree], so they can be found/removed when -autofree is fixed 2022-11-01 18:08:38 +02:00
Delyan Angelov
ffd9b9bae1
ci,toml: add a workaround for buggy -autofree (skip -autofree compilation for some of the toml functions, that prevent VED to compile cleanly on the CI) 2022-11-01 17:52:41 +02:00
penguindark
362adfae3a
regex: fix a bug for CC token not correctly parsed in groups (#16272) 2022-11-01 08:58:29 +02:00
Alexander Medvednikov
135b1ccb14 V 0.3.2 2022-11-01 05:41:13 +03:00
Spydr
1b721250e0
native: enable printing for all supported expressions (#16270) 2022-10-31 17:43:02 +02:00
yuyi
339bd0c4b5
checker: check fn type mismatch of return result type fn (#16269) 2022-10-31 14:05:43 +02:00
shove
c3e209a634
scanner: prevent resolving to nested interpolation (fix #16240) (#16259) 2022-10-31 10:47:32 +02:00
yuyi
0390a7a988
cgen: fix return match expr of sumtype result (#16264) 2022-10-30 20:26:33 +02:00
yuyi
64cbadc6f1
scanner: fix new string interpolation println('{a}{b}{c}{d}') (#16258) 2022-10-30 20:18:31 +02:00
Delyan Angelov
9edb48571f
pref,cgen: support -no-bounds-checking, instead of -d no_bounds_checking, and make it enable direct_array_access for all fns/methods. 2022-10-30 14:39:45 +02:00
lemon
54b623743d
native, checker: cast float_literal to f32 explicitly in code gen (#16254) 2022-10-30 10:31:18 +02:00
shove
93d765eeee
cgen: fix dump() multi ptr (fix #16247) (#16251) 2022-10-29 10:07:28 +03:00
Swastik Baranwal
a988ef3474
checker: add check for mut ident but not if mut ident is for interfaces (#16214) 2022-10-29 06:36:44 +03:00
yuyi
ee782e9119
checker: fix return error with multi_return optional (#16250) 2022-10-29 06:34:45 +03:00
Hitalo Souza
78c4b9a7bb
doc: one single file for vweb (#16248) 2022-10-29 06:33:48 +03:00
Delyan Angelov
02c3af2432
all: add support for enum Xyz as u64 { + tests (#16246) 2022-10-29 06:32:20 +03:00
Delyan Angelov
a0a055cc4c
ci: fix failures after c6158e4 2022-10-28 21:52:52 +03:00
Alexander Medvednikov
c6158e4519 all: remove unnecessary IError() casts 2022-10-28 19:08:30 +03:00
yuyi
daa2f90023
scanner: fix and resotre string interpolation tests (#16242) 2022-10-28 18:39:32 +03:00
shove
5daa38fdb1
util: fix smart_quote, so that v -cstrict file.v works with println('\\$') (fix #16230) (#16233) 2022-10-28 12:41:13 +03:00
StunxFS
ef1696b3e1
v.util: add path_styled_for_error_messages/1 (#16219) 2022-10-28 11:27:00 +03:00
shove
af56719f9d
fmt: fix compiler_error('...') broken by fmt (fix #16218) (#16231) 2022-10-28 06:48:09 +03:00
StunxFS
219079e3a6
v.eval: consistency in commit hash shown on panic (#16227) 2022-10-28 06:47:50 +03:00
shove
c5ee33b7aa
cgen: fix comparing struct with pointers to interface values (fix #16074) (#16215) 2022-10-28 06:47:31 +03:00
yuyi
992106c6f7
tests: fix ci errors temporary (#16237) 2022-10-28 06:46:20 +03:00
yuyi
0ca5b1f6ff
cgen: fix $tmpl() in returning match expr (fix #16109, fix #16124) (#16229) 2022-10-27 18:03:27 +03:00
Alexander Medvednikov
e356a74a4c tests: disable a single string interpolation test for now 2022-10-27 18:02:25 +03:00
Alexander Medvednikov
cc58d6a919 all: string interpolation fixes 2022-10-27 17:52:30 +03:00
Alexander Medvednikov
098db89b85 encoding.csv: remove unnecessary IError() cast 2022-10-27 11:30:08 +03:00
Alexander Medvednikov
c9934672c4 http: fix request_test.v 2022-10-27 11:28:44 +03:00
Alexander Medvednikov
a134c09718 os: fix font.v compilation 2022-10-27 11:13:43 +03:00
Alexander Medvednikov
e1ffc76efd tests: fix some interpolation tests 2022-10-27 11:12:15 +03:00
Alexander Medvednikov
604f19adba scanner: : str inter fix 2022-10-27 11:08:32 +03:00
Alexander Medvednikov
18c7da9a5e all: new string interpolation "hello {name}!" 2022-10-27 11:01:01 +03:00
StunxFS
e6fad82b87
v.eval: support unsafe expr (#16224) 2022-10-27 10:38:57 +03:00
yuyi
064e35fbc4
parser: fix $tmpl with single quotes (fix #16154) (#16216) 2022-10-26 19:38:08 +03:00
yuyi
992b502198
db, json, time, term: change optional to result (#16201) 2022-10-26 11:26:28 +03:00
lemon
2a7420f572
native: add initial support for f32/f64 (#16210) 2022-10-26 10:37:46 +03:00
shove
fef4dd94e9
ast, checker, cgen: enable unsafe { nil } with reference to interface fields in structs (fix #16198) (#16199) 2022-10-26 09:39:23 +03:00
yuyi
53c6e46a51
parser: correct comptime path not found error position (fix #16189) (#16209) 2022-10-26 09:33:58 +03:00
Delyan Angelov
b2ab7a333b
transformer: improve -trace-calls output, enable tracing of builtin fns, show elapsed ns and used stack size (#16205)
Make it easier to change later, by splitting the tracing call into its own `v.trace_calls` module, so that it can be iterated upon without changing the compiler itself.
2022-10-25 20:56:12 +03:00
yuyi
03bef24456
checker: fix returning embedded error result (#16208) 2022-10-25 18:17:48 +03:00
Alexander Medvednikov
690b2c0b9d doc: more Result fixes 2022-10-24 16:26:19 +03:00
yuyi
4aa4af4afb
cgen: fix vweb app route methods filtering (#16186) 2022-10-24 12:51:20 +03:00
shove
701586fa84
checker, cgen: enable calls to methods of the parent element array, when an array element is an alias (fix #16169) (#16187) 2022-10-24 12:02:24 +03:00
Swastik Baranwal
f25dfa9d8c
checker: add error for unwrapped result in infix expr (#16175) 2022-10-24 11:53:35 +03:00
yuyi
48f43f11ea
all: change optional to result in vlib/v. (#16177) 2022-10-24 11:51:20 +03:00
Ikko Ashimine
26986104f9
cgen: fix typos (#16174) 2022-10-23 22:28:58 +03:00
yuyi
7b8044b8c4
cgen: fix using 'array' name variable in array_init (#16168) 2022-10-23 22:23:15 +03:00
Wertzui123
340611c298
net: add a net.tcp_socket_from_handle_raw function (#16167) 2022-10-23 22:21:46 +03:00
Delyan Angelov
9241b5572b
net.http: skip network timeouts on socket accept in the main http.Server loop 2022-10-23 17:08:27 +03:00
yuyi
3f035205b3
cgen: fix return result in or block (#16158) 2022-10-23 13:11:11 +03:00
shove
721dbec2e4
checker: fix missed check on the initialization of result struct fields (fix #16152) (#16153) 2022-10-22 20:02:11 +03:00
Spydr
83338e044a
native: fix small issues with compile-time conditionals (#16149) 2022-10-22 19:56:19 +03:00
shove
b8b2b4ad0a
checker: fix the pos information in the warning message, when the label is not used (fix #16146) (#16148) 2022-10-22 19:26:38 +03:00
Delyan Angelov
a23e06184d
checker: fix taking a closure of x, where x may be coming from a non trivial parent scope, like for x in y { or x,y := multi() (fix #16141) (#16147) 2022-10-22 15:53:27 +03:00
l-m
a139bed785
builtin: add string.trim_indexes method, that can be used in string.trim, but also separately from it (#16144) 2022-10-22 12:56:05 +03:00
yuyi
b6faf82911
parser: minor optimization in sql_expr() (#16145) 2022-10-22 12:11:45 +03:00
yuyi
9288c75c94
parser: simplify and cleanup check_undefined_variable() (#16140) 2022-10-22 11:26:21 +03:00
shove
e863191ff6
checker: fix generic information is lost of the map built-in method call (fix #16077) (#16134) 2022-10-21 23:07:05 +03:00
yuyi
ab78d5a7ba
parser: check undefined variable in if guard (#16138) 2022-10-21 22:48:59 +03:00
Makhnev Petr
2e8b9e3b92
v fmt: fix extra space for anon struct (#16131) 2022-10-21 10:38:19 +03:00
bogen85
c684dd8c9b
log: mark log.fatal as [noreturn] (#16129) 2022-10-21 10:33:49 +03:00
yuyi
51f4d99399
all: change optional to result in most of the libraries (#16123) 2022-10-20 22:14:33 +03:00
yuyi
0d368562f4
cgen: minor optimization and cleanup in match_expr_sumtype() (#16126) 2022-10-20 20:36:56 +03:00
locriacyber
a3b050aced
vrepl: add support for Home and End keys (#16116) 2022-10-20 20:07:57 +03:00
yuyi
f8a28b5a5d
checker: check generic method called with a variadic argument mismatch (fix #16106) (#16110) 2022-10-20 15:28:30 +03:00
shove
07310d850d
ast, cgen: fix wrong name and cname, when array and fixed array elements have optional (fix #16099) (#16122) 2022-10-20 14:17:57 +03:00
Delyan Angelov
2083e6b04c
os: cleanup APIs returning !bool to either return ! or bool (#16111) 2022-10-20 13:56:06 +03:00
Swastik Baranwal
ac63fa1b11
parser: improve error for fixed array, when it has len and cap attributes in the initialisation list (#16120) 2022-10-20 13:36:13 +03:00
Delyan Angelov
ffcdac4201
ci: fix v_tictactoe.out after 05a1c3e 2022-10-19 22:33:10 +03:00
Delyan Angelov
05a1c3e8a3
parser,ci: fix regression after eda65ad in the VLS tests 2022-10-19 22:29:08 +03:00
yuyi
612faac0f0
all: change index expr returning optional to result too (#16097) 2022-10-19 21:04:16 +03:00
Delyan Angelov
eda65ad660
parser,checker,builder: make the checker more robust with -check over files with syntax/parsing errors 2022-10-19 18:14:58 +03:00
Delyan Angelov
7f294c8278
tests: use _test.v for the postfix of some test files, that were missing it 2022-10-19 12:38:58 +03:00
Makhnev Petr
2f3c4c6d91
v fmt: fix extra space for lock/rlock without expressions (#16103) 2022-10-19 12:18:21 +03:00
yuyi
026fccd373
cgen: fix match expr with last aggregate branch (#16101) 2022-10-19 11:49:39 +03:00
Alexander di Chiara
e3379bca97
datatypes: add quadtree, add its demo to examples/ (#16087) 2022-10-18 18:02:44 +03:00
StunxFS
cc9b754801
vlib: delete unused darwin module (#16093) 2022-10-18 18:01:25 +03:00
yuyi
9242d4b79b
json2: minor cleanup in README.md (#16096) 2022-10-18 18:00:14 +03:00
Delyan Angelov
71bff213ef
builtin: make the C. WIN32 API declarations more precise, to catch errors earlier (#16090) 2022-10-17 20:23:33 +03:00
yuyi
126c4c5751
builtin,math: fix math.min_i64.str() (fix #16086) (#16089) 2022-10-17 19:36:46 +03:00
yuyi
556244576d
checker: check unused last expression in if (fix #16084) (#16088) 2022-10-17 18:15:01 +03:00
Subhomoy Haldar
43b9a716c5
builtin,strconv: append ".0", to float string representations, to ensure clarity (#16079) 2022-10-17 15:41:07 +03:00
Delyan Angelov
409a4f33a1
tools: add report_v_module_folders_without_tests.v . Use it to discover other modules without _test.v files. Add simple ones, to ensure CI can find more breakage on future wide changes to vlib/ 2022-10-16 22:40:17 +03:00
Delyan Angelov
17800b4bca
ci: fix net.openssl, ensure that it is at least compiled, to avoid future regressions on sweeping vlib changes 2022-10-16 20:59:04 +03:00
Delyan Angelov
95d2c58148
checker: produce more informative error messages on ~,!,-,<- operator type mismatches 2022-10-16 20:27:40 +03:00
Delyan Angelov
3d2e251bf2
transformer: fix precalculations of simple expressions involving floating literals, with -prod (fix VSL tests with -prod) 2022-10-16 20:23:41 +03:00
Delyan Angelov
d857e97d8c
strconv: enable VTL compilation with -prod (remove deprecation for strconv.v_sprintf temporarily) 2022-10-16 17:43:52 +03:00
Delyan Angelov
78e9362d74
ci: workaround for a VLS failing test, that stops symbol registration after the first fn()! { 2022-10-16 13:38:20 +03:00
Delyan Angelov
c02974622f
tests: add checks_for_operator_overrides_should_happen_on_the_concrete_types_when_using_generics_test.v 2022-10-16 12:57:34 +03:00
Delyan Angelov
710c2b22da
parser: fix infinite loop for type Handler = fn (test string) string without newline at the end 2022-10-16 10:42:53 +03:00
yuyi
f6844e9766
all: change optional to result of io (#16075) 2022-10-16 09:28:57 +03:00
shove
6e46933c55
cgen: fix or {} handling, when waiting for a single go thread, of a function returning !Type (fix #16065) (#16073) 2022-10-14 19:54:13 +03:00
Delyan Angelov
49c12e4d1c
cgen: fix ./tracev examples/hello_world.v 2022-10-14 19:27:40 +03:00
shove
6bf2ad1ff0
cgen: fix missing * of optional non-ref structs (fix: #16070) (#16071) 2022-10-14 10:34:42 +03:00
yuyi
39d2aa71df
checker: check generic closure fn declaration (#16069) 2022-10-14 10:24:10 +03:00
zztkm
3e4cfc7343
os: add os.to_slash and os.from_slash functions (#16055) 2022-10-14 10:22:36 +03:00
Subhomoy Haldar
09e23e3ed6
rand: add rand.element and prng.element functions with unit test (#16068) 2022-10-14 06:54:02 +03:00
shove
aabda5a525
checker: allow get_ref() or { unsafe{nil} }, as well as fn get_ref() ?&Type { return unsafe { nil } } (fix: #16062) (#16063) 2022-10-13 19:49:10 +03:00
shove
51a9e89c4a
ast: disallow threads << go fn()?{} and threads << go fn()!{} (fix #16061) (#16064) 2022-10-13 19:37:27 +03:00
yuyi
f0108323d1
cgen: fix generic closure fn direct call (#16057) 2022-10-13 18:06:34 +03:00
shove
e3e8bb2f88
cgen: remove spaces in the generated name for ?&C.struct (fix #16058) (#16059) 2022-10-13 18:05:16 +03:00
yuyi
bfbfe78366
cgen: fix assigning optional of multi_return with heap (#16049) 2022-10-13 13:07:52 +03:00
shove
213a094680
ast: fix missing 'optional' and 'result' in type name and cname of map (#16047) 2022-10-13 10:38:02 +03:00
Swastik Baranwal
3e33f4a11d
checker: disallow nil assignment on non pointer struct fields (#16056) 2022-10-13 10:36:59 +03:00
yuyi
fb3d093e01
builtin: remove opt_ok2() (part 2) (#16054) 2022-10-13 10:35:41 +03:00
shove
4fbb29a2c0
checker: disallow x := fncallexpr() or { X{} } , when the fn result type is ?&X (fix #16050) (#16051) 2022-10-12 22:49:30 +03:00
yuyi
6bdd11e53b
checker: check error for fn call with extra parenthesis (#16052) 2022-10-12 22:43:59 +03:00
yuyi
211cb2af7b
cgen: remove opt_ok2() part 1 (#16048) 2022-10-12 17:20:41 +03:00
yuyi
c590c8250e
cgen: fix fn with optional of multi_return (#16046) 2022-10-12 09:44:15 +03:00
Delyan Angelov
7f2d731d19
cgen: fix dump(c_struct), where c_struct has fields of type &&char 2022-10-12 09:00:16 +03:00
shove
9569c0504c
cgen: fix map with optional or result on return (#16044) 2022-10-12 07:54:29 +03:00
Rasheed
12d3664a09
builtin: add a declaration for C.putchar (#16037) 2022-10-11 20:53:12 +03:00
shove
4c0ea67137
cgen: fix map with optional or result (fix #15972) (#16036) 2022-10-11 16:33:19 +03:00
Swastik Baranwal
05fc7d3a72
checker: disallow function cast outside unsafe (#16030) 2022-10-11 15:46:35 +03:00
Wertzui123
5047058595
stbi: fix memory leak from stbi.load/1 with GC (#16028) 2022-10-11 15:19:36 +03:00
yuyi
34f233c93f
cgen: fix generic struct init with generic cast (#16035) 2022-10-11 15:00:02 +03:00
yuyi
dab1c8a71d
all: clean up optional and result handling (#16034) 2022-10-11 09:23:57 +03:00
shove
34d115d883
cgen: fix wrong when string attributes with quotes (fix #15194) (#16020) 2022-10-11 07:48:26 +03:00
shove
eebc82d83a
fmt: fix wrong processing of quotes, when formatting string literals (fix #16017) (#16018) 2022-10-10 21:19:34 +03:00
yuyi
8f3f717736
checker: check type mismatch of return match expr (#16019) 2022-10-10 19:41:55 +03:00
yuyi
89eb8358cf
checker: fix fn returning ![]string called in main (#16023) 2022-10-10 19:41:24 +03:00
Thomas Peißl
0f229874a2
net.mbedtls: add explicit closing of the tcp connection in the shutdown method (#16027) 2022-10-10 19:30:58 +03:00
Delyan Angelov
82593338fa ci: fix v -usecache -o x cmd/v on macos 2022-10-10 16:01:04 +03:00
Delyan Angelov
d4e89de8fb
ci: fix v -cstrict -cc gcc vlib/v/gen/native/macho_test.v 2022-10-10 13:28:18 +03:00
Delyan Angelov
3c25f506ed Revert "stbi: fix loading image from memory (#15981); breaks UI's rectangle example on macos, probably others too"
This reverts commit 07d5612347.
2022-10-10 10:39:32 +03:00
Delyan Angelov
ade8fdff69
vfmt: fix v -W ./cmd/tools/vfmt.v, (and v -W build-examples) 2022-10-10 03:44:11 +03:00
yuyi
32ab08287c
checker: add a notice about skipping the generic route methods of vweb apps (#16013) 2022-10-10 02:50:10 +03:00
Niraj Kulkarni
553315b80c
gx: add documentation for Color methods (#16010) 2022-10-10 02:47:55 +03:00
shove
8666ef43fd
cgen: fix dependency order error between sumtype and fixed array type (fix #16003) (#16009) 2022-10-09 12:16:50 +03:00
ChAoS_UnItY
95f57e9206
builtin: deprecate array.reduce in favour of arrays.fold (#16001) 2022-10-09 10:29:50 +03:00
yuyi
fe6197fe2d
fmt: remove comma inside map_init using multi_line (#16007) 2022-10-09 08:39:30 +03:00
shove
e2398cafd2
cgen: fix str() fails when the structure 'charptr' type field is nil (fix #15970) (#16002) 2022-10-09 08:33:45 +03:00
Delyan Angelov
54197121bc
sokol.sapp: remove update_cursor from EventType, since it is no longer defined in Sokol, fixes examples/gg/drag_n_drop.v 2022-10-08 22:01:22 +03:00
shove
cd96a43030
fmt: fix unreasonable wrap after if in if very_long && condition { (fix #15635) (#15995) 2022-10-08 19:31:00 +03:00
yuyi
ce1ba2ad02
checker: check fn returning fn type mismatch (fix #15988) (#15997) 2022-10-08 19:28:41 +03:00
Swastik Baranwal
49aac93d87
checker: disallow literals on the left side of assignments (#15999) 2022-10-08 19:27:30 +03:00
yuyi
91e641a422
parser: fix map init with multi enum keys (fix #15965) (#15991) 2022-10-08 18:56:02 +03:00
Delyan Angelov
754c387d1b
cgen,checker: support simple voidptr casts in consts, without delaying the initialisation to _vinit (#15996) 2022-10-08 13:14:26 +03:00
yuyi
272b3cf8c3
checker: check undefined operation of the generic infix expr (#15987) 2022-10-08 12:09:32 +03:00
locriacyber
07d5612347
stbi: fix loading image from memory (#15981) 2022-10-07 17:20:35 +03:00
yuyi
03f82d5f68
cgen: fix generic for_in using iteration (#15979) 2022-10-06 18:20:38 +03:00
yuyi
73e28ec523
checker: fix infering fn type using reference argument (#15978) 2022-10-06 17:25:02 +03:00
Delyan Angelov
88d69d7d54
cgen,pref,preludes: implement v -assert continues file_test.v (#15976) 2022-10-06 17:20:32 +03:00
Larpon
58bf2838c0
builder: exclude LDFLAGS in .o builds (#15977) 2022-10-06 17:18:48 +03:00
Joe Conigliaro
87a364ff24
cgen: remove condition no longer needed after #15944 2022-10-06 17:15:15 +11:00
Joe Conigliaro
3eff20c5fd
checker,cgen: small optimizations for previous commit 2022-10-06 17:03:48 +11:00
Joe C
18f0040388
checker/gen/parser: varg with pointer type fix: #15943 (#15944) 2022-10-06 15:58:07 +11:00
yuyi
f0871b87a4
term: fix errors in input_windows.c.v (#15966) 2022-10-05 13:24:22 +03:00
yuyi
6ccdf89546
cgen: fix vweb using generic method (fix #15888) (#15963) 2022-10-05 13:23:47 +03:00
Alexander Medvednikov
46138a2841 cbuilder: more clear fn name 2022-10-05 08:51:52 +03:00
ChAoS_UnItY
acbfe88dd9
arrays, maps: cleanup comments and parameter names in function signatures (#15960) 2022-10-04 10:07:36 +03:00
kahsa
40cbd68272
sqlite: add a sqlite.is_error() helper (#15964) 2022-10-04 10:03:59 +03:00
Swastik Baranwal
267e26ba1d
net: add unsafe block to int -> enum cast (#15961)
Fixes https://github.com/vlang/v/issues/15959
2022-10-03 21:56:06 +03:00
Spydr
6ac9552d39
native: support simple library calls (#15958) 2022-10-03 17:49:22 +03:00
Swastik Baranwal
9fc64de94b
openssl: add unsafe blocks to int -> enum blocks (#15957) 2022-10-03 16:32:37 +03:00
shove
dc2ba1c33f
ast, parser, fmt: fixed and optimized comments for 'for, for_c, for_in stmts' (fix: #15922) (#15950) 2022-10-03 10:45:11 +03:00
ChAoS_UnItY
ffaca82ff8
arrays, maps: add indexed variant of collection function and minor cleanup (#15948) 2022-10-03 10:42:36 +03:00
Spydr
5b59171a00
checker, native: Check arguments of native builtin functions (#15952) 2022-10-03 10:41:59 +03:00
Delyan Angelov
c655847dfb
native: fix notices when building cmd/tools/builders/native_builder.v 2022-10-02 22:48:06 +03:00
Swastik Baranwal
b584e1df98
checker: allow EnumName(number) casts only inside unsafe{} blocks (#15932) 2022-10-02 22:39:11 +03:00
Spydr
7993f0bf39
native: support for compile-time conditionals (#15949) 2022-10-02 22:31: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
yuyi
b158da398b
parser: fix checking for duplicate main functions (#15946) 2022-10-02 12:14:25 +03:00
Delyan Angelov
ed2960a20e
sokol.sapp: fix compilation of gg apps with -prod (add typedef tags to Sokol's C struct declarations) 2022-10-02 12:10:35 +03:00
Delyan Angelov
35368b5721
checker: small cleanup in Checker.check_ref_fields_initialized 2022-10-02 12:10:35 +03:00
Delyan Angelov
eec126e26c
vfmt: run v fmt -w vlib/v/gen/native/tests/ 2022-10-02 12:10:34 +03:00
ChAoS_UnItY
20f5eef2dc
maps: add a maps module, with generic filter, flatten, invert, to_map, to_array, from_array functions (#15945) 2022-10-02 10:59:13 +03:00
Swastik Baranwal
8a38bc2324
fmt: keep volatile qualifier in global declarations (#15947) 2022-10-02 10:50:16 +03:00