Delyan Angelov
02e4aa0f0e
v.checker: fix panic for `a, b, c = fn_returning_several_maps()`
2021-10-02 18:40:35 +03:00
Alexander Ivanov
cb149bfa00
checker: show errors for index calls to values which are not functions, fixes #11539 ( #12024 )
2021-10-01 15:17:02 +03:00
Alexander Medvednikov
d4b3c65c45
cgen: a minor optimization; checker: a c2v fix
2021-09-30 12:51:53 +03:00
Louis Schmieder
f9ceb12e22
checker: fix orm cast check ( #12018 )
2021-09-30 00:43:08 +03:00
yuyi
d6a4bce2ef
checker: fix generic array.map with generic callback fn ( #11991 )
2021-09-27 17:50:15 +03:00
Louis Schmieder
6391f3d2da
orm: fix other int types ( #11981 )
2021-09-26 11:17:56 +03:00
Alexander Ivanov
4d0f835548
checker: fix detection of invalid insertions, fixes #3600 ( #11945 )
2021-09-23 11:59:43 +03:00
yuyi
d6fa6a459c
checker: fix generic sumtype method ( #11565 )
2021-09-21 16:19:43 +03:00
ChAoS_UnItY
95136cbfc7
all: add unsigned shift operators ( #11536 )
2021-09-21 14:02:17 +03:00
Enzo
b2ecca3966
all: remove `size_t` ( #11478 )
2021-09-21 02:12:38 +03:00
Alexander Medvednikov
6799f3ac5c
orm: verify column name in updates
2021-09-19 04:49:29 +03:00
Rémi
e76be4ba37
checker: temporary error for optional struct fields ( #11293 ) ( #11534 )
2021-09-18 23:22:24 +03:00
yuyi
39ad6da506
checker, cgen: generate .free() methods for custom structs automatically ( #11529 )
2021-09-18 09:38:42 +03:00
Alexander Ivanov
30e53c95c7
checker: handle `if _likely_(x is Interface) {` from #11485 ( #11519 )
2021-09-17 21:01:12 +03:00
yuyi
d5e00b0920
checker, cgen: fix generic arrays sum() ( #11502 )
2021-09-16 07:08:28 +03:00
yuyi
09ded16e3d
checker: use 'if foo in [TypeA, TypeB]' in checker.v ( #11494 )
2021-09-16 07:08:14 +03:00
Delyan Angelov
5bc6cc9512
v.checker: fix spurious warning for `if x := map_of_sumtypes[k] {}`
2021-09-15 15:42:28 +03:00
yuyi
9554470985
checker, cgen: fix generic operator overload of 'cmp' ( #11489 )
2021-09-14 16:20:02 +03:00
yuyi
8862c3af0f
all: implement `if foo in [Foo1, Foo2, Foo3]` ( #11486 )
2021-09-14 15:56:12 +03:00
Alexander Medvednikov
12ec900d20
checker: fix the void type check
2021-09-14 01:02:32 +03:00
Daniel Däschle
b63ec8fbcf
checker: require `params` attribute to use struct as keyword arguments in function ( #11135 )
2021-09-14 00:05:30 +03:00
Alexander Medvednikov
04d4431299
checker: remove another unnecessary error
2021-09-13 18:35:08 +03:00
Alexander Medvednikov
cfcc57f5d3
checker: remove unnecessary "no methods" error; builder: skip float.c.v with -nofloat
2021-09-13 18:14:26 +03:00
yuyi
30029eaf5d
checker, cgen: fix generic operator overload ( fix #11472 ) ( #11479 )
2021-09-13 09:49:28 +03:00
yuyi
cd7d482c3b
checker: fix generic array append ( #11475 )
2021-09-12 15:09:11 +03:00
Enzo
ccf6285f82
checker: allow mut arg on C functions ( #11430 )
2021-09-11 14:25:38 +03:00
Daniel Däschle
be0c54caf9
checker: require or block for sumtype map ( #11089 )
2021-09-10 16:07:39 +03:00
Delyan Angelov
7143b8ab37
v.checker: allow assigning pointers to fn variables (fix vinix compilation)
2021-09-10 11:48:36 +03:00
Alexander Medvednikov
ab3adf3346
checker: no longer allow automatic dereferncing in `a = b`
2021-09-09 20:21:01 +03:00
Delyan Angelov
4faa0f8487
v.checker: add checks for `.free()` methods
2021-09-09 09:54:06 +03:00
Alexander Medvednikov
4a2728e1bf
checker: verify json.decode type
2021-09-08 14:49:02 +03:00
yuyi
6084c0fc54
checker, cgen: fix complex generic sumtype ( fix #11392 ) ( #11400 )
2021-09-06 03:15:53 +03:00
Alexander Medvednikov
71f1be5388
checker: fix a typo
2021-09-05 18:46:14 +03:00
yuyi
3fd2dd45a4
checker: do now allow type name shadowing ( #11401 )
2021-09-05 18:34:21 +03:00
yuyi
48e65a7bb2
checker: check type in match range ( fix #11337 ) ( #11389 )
2021-09-05 04:50:43 +03:00
yuyi
923ef733c0
checker: disallow array sort with fancy args for now ( #11388 )
2021-09-04 14:34:29 +03:00
Delyan Angelov
96ef553f59
checker: check sumtype common fields for mutability when assigning too
2021-09-03 13:33:25 +03:00
yuyi
985fe85de2
checker: show concretes type name in error message ( #11333 )
2021-08-29 12:08:57 +03:00
Daniel Däschle
ac442abc11
checker: allow noreturn in match expr ( #11126 )
2021-08-29 11:57:11 +03:00
yuyi
f257a23313
checker: check non-generic struct init ( #11300 )
2021-08-25 14:40:40 +03:00
yuyi
96398efd2b
checker: check array insert/prepend arguments ( #11295 )
2021-08-24 20:28:05 +03:00
yuyi
2e28c9a4d6
checker: remove a duplicate check ( #11265 )
2021-08-22 12:09:14 +03:00
yuyi
0d81d0c0c6
table, checker: fix sumtype array appending aggregate type values ( fix #11197 ) ( #11258 )
2021-08-21 17:18:01 +03:00
yuyi
e87cf8bac6
checker: cleanup checker.v ( #11251 )
2021-08-20 10:25:16 +03:00
yuyi
6201e78201
checker: fix generic struct with non-generic interface in generic fn ( #11252 )
2021-08-20 09:28:26 +03:00
yuyi
a440b43630
checker, cgen: fix generic struct with non_generic interface ( #11240 )
2021-08-20 01:13:48 +03:00
yuyi
3d22dc1608
all: fix formating Foo<A,B> to Foo<A, B> ( #11225 )
2021-08-18 17:17:21 +03:00
yuyi
e07678d6f3
checker: check using redundant parentheses ( #11228 )
2021-08-18 13:49:50 +03:00
yuyi
c51f83efba
checker: fix match expr type mismatch ( #11220 )
2021-08-18 08:52:01 +03:00
spaceface
7d9969ac17
all: support runtime interface conversions ( #11212 )
2021-08-17 21:00:27 +03:00
Leo Developer
b3094b0667
checker: abort prematurely on too many errors ( #11185 )
2021-08-15 13:41:51 +03:00
Leo Developer
f6d7170e77
checker: changes related to warn/error limit ( #11184 )
2021-08-14 22:14:13 +03:00
Leo Developer
8a8a0932f7
all: add limit to accumulated errors / warnings ( #11183 )
2021-08-14 19:49:21 +03:00
Delyan Angelov
deb26b92b9
cgen: support `typeof(x).idx`, as well as `iface.type_idx()` ( #11178 )
2021-08-14 17:22:25 +03:00
Delyan Angelov
900c37aa65
v.gen.c: support `T.typ` - an int for the type index of the generic type `T` ( #11175 )
2021-08-14 08:48:25 +03:00
yuyi
579aa7b1b5
v.checker: fix multi insts of generics fn with generic struct ( #11161 )
2021-08-12 22:58:02 +03:00
yuyi
90adf4d092
v.checker: fix multi insts of generics struct with array ( #11142 )
2021-08-11 16:59:13 +03:00
Delyan Angelov
a64a4d932c
v.checker: turn `interface field ... must be initialized` to a notice temporarily
2021-08-11 16:39:41 +03:00
Enzo
da53f818df
all: initial support for closures (x64 / linux-only) ( #11114 )
2021-08-10 21:27:15 +03:00
Daniel Däschle
a64b191ce5
checker: forbid multiple pointer yields ( #11105 )
2021-08-09 02:11:53 +03:00
Daniel Däschle
9af65d8830
checker: protect against assigning to a typeless variable ( #11094 )
2021-08-07 18:09:07 +03:00
yuyi
11784279ba
checker: check fn_call().sort() ( fix #11040 ) ( #11056 )
2021-08-04 21:23:22 +03:00
Delyan Angelov
f9c279d11d
v.checker: make calling a deprecated fn an error, 180 days (6 months) after its deprecation date ( #10682 )
2021-08-04 17:41:00 +03:00
Daniel Däschle
800c0e5092
vlib: remove deprecated map{} usages as well as deprecated functions ( #11035 )
2021-08-04 12:44:41 +03:00
Daniel Däschle
815c4b7420
all: rename generic_struct_inst to generic_inst ( #11044 )
2021-08-04 03:37:27 +03:00
Louis Schmieder
a55ba08fad
orm: fix time ( #11026 )
2021-08-03 05:17:00 +03:00
Leo Developer
6dcf72fe9b
cgen: dont generate function if its flag is false ( #11021 )
2021-08-03 03:17:22 +03:00
Florian Blasius
69f31d8d5c
checker: check int literal to enum cast ( fix #10125 ) ( #10348 )
2021-08-02 07:12:29 +03:00
Uwe Krüger
6068777e03
parser/checker: deduce type of global from initialization expression ( #11005 )
2021-07-31 16:35:19 +03:00
Delyan Angelov
e374ffb590
checker: add an early checker error for `node.left_types.len != node.left.len` in assignments
2021-07-31 14:57:29 +03:00
Louis Schmieder
0bb587c8c2
checker: fix defer ident handling & fix defer optional error message ( #10975 )
2021-07-30 20:29:06 +03:00
Alexander Medvednikov
ec92964bb0
checker: make interface init check a warning for now
2021-07-30 03:32:02 +03:00
Louis Schmieder
7c504920e1
checker: fix negative values for unsigned integers ( #10976 )
2021-07-30 03:27:59 +03:00
Daniel Däschle
6fa8e4269e
checker: force interface init ( #10910 )
2021-07-30 03:18:20 +03:00
yuyi
57f30668e3
v.checker: fix `a.map(voidfn(it))` ( #10985 )
2021-07-29 11:43:56 +03:00
Uwe Krüger
08aa6c08f6
all: more improvements for global variables ( #10986 )
2021-07-29 10:57:31 +03:00
yuyi
9f4431544d
checker: fix typo in selector_expr() ( #10977 )
2021-07-28 08:28:55 +03:00
Uwe Krüger
45ad48d76a
cgen: properly handle initialization expression for globals ( #10981 )
2021-07-28 08:11:55 +03:00
Delyan Angelov
6134c4870b
v.util: extract v.util.version, use it to speed up building `v repl`, `v up` and `v doctor`
2021-07-27 12:59:56 +03:00
yuyi
4cf91a28f6
checker: fix generics interface with multi generic types ( #10964 )
2021-07-26 08:54:57 +03:00
Delyan Angelov
0bcb955258
checker: fix regression of anon fns that have loops with break/continue
2021-07-25 10:46:31 +03:00
Uwe Krüger
55c5b9ce7b
cgen: panic with error message when `go` command fails ( #10943 )
2021-07-25 01:13:34 +03:00
Daniel Däschle
3be8ef3b5a
checker: check duplicated field and method (only for fields that are anon-fns for now) ( #10927 )
2021-07-24 16:06:09 +03:00
Delyan Angelov
b9771ea120
v.checker: small cleanup for incomplete match errors
2021-07-24 13:32:55 +03:00
Uwe Krüger
1e5627e777
parser: don't require unary `>` prefix for `select` timeout ( #10928 )
2021-07-23 23:24:27 +03:00
Louis Schmieder
1999850f88
checker: disallow labels in defer statements ( #10901 )
2021-07-23 22:35:05 +03:00
playX
69cbdf9fdc
v.gen.js, os_js: port the OS module to JS ( #10872 )
2021-07-23 18:04:36 +03:00
Delyan Angelov
6313ed6a79
checker,cgen: fix `-os cross` support for `$if !solaris { #include <sys/ptrace.h> }`
2021-07-23 16:24:42 +03:00
Delyan Angelov
c797e1460d
checker: do not skip any of the top level `$if OS {` branches in `-os cross` mode
2021-07-23 15:53:03 +03:00
Louis Schmieder
26db3b0995
orm: redesign orm (re-write it in V) ( #10353 )
2021-07-23 12:33:55 +03:00
Daniel Däschle
a2de3ffcdb
checker: check if condition optional ( #10921 )
2021-07-23 08:52:51 +03:00
Daniel Däschle
2c0c211c79
all: implement accessing embedded field and method of aggregate ( #10907 )
2021-07-23 01:14:39 +03:00
Daniel Däschle
f40090e8ff
checker: fix break inside anon fn ( #10914 )
2021-07-23 01:13:36 +03:00
Louis Schmieder
742f6f849c
checker: check using a map as a struct init in parameter ( #10904 )
2021-07-22 10:42:59 +03:00
Daniel Däschle
12884e9eb7
checker: disallow invalid pointer arithmetic ( #10888 )
2021-07-21 23:39:49 +03:00
shadow
591af866ba
checker: prohibit returning a fixed array ( #10882 )
2021-07-21 11:39:22 +03:00
Daniel Däschle
f6402eae10
checker: check `match` with type alias ( #10863 )
2021-07-20 15:06:36 +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
playX
425ca5e3c3
v.gen.js: add three backend options for JS, and comptime if support ( #10859 )
2021-07-19 15:55:03 +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
241a7b760d
strconv,checker,cgen: fix -cstrict compilation of hello_world.v
2021-07-19 01:08:48 +03:00
Delyan Angelov
48546d0f45
all: do compile time const evaluation for `const x = "abc" + "xyz"` and `const x = 16 * 1024 + 5` (fix const prealloc_block_size)
2021-07-18 22:59:18 +03:00
shadowninja55
eb65ad078d
checker: prohibit passing non-lvalue as `voidptr` ( #10838 )
2021-07-18 15:04:16 +03:00
yuyi
8b8f496762
checker: fix generics fn return generic interface ( fix #10818 ) ( #10831 )
2021-07-18 08:55:19 +03:00
Delyan Angelov
568aa742b2
v.parser: improve conditions for debugging ast.CastExpr parsing
2021-07-17 17:49:29 +03:00
spaceface
22fcbe70a2
checker: allow omitting `{}` in trailing struct args ( #10832 )
2021-07-17 15:44:44 +03:00
shadowninja55
0d587d3580
checker: prohibit using non-lvalue as mut receiver ( #10790 )
2021-07-16 13:03:40 +03:00
yuyi
ddaac5af92
checker: fix generics with multi generic struct types ( #10808 )
2021-07-15 17:39:55 +03:00
shadowninja55
7c0be629ab
checker: prohibit fixed array to fixed array assignment where elem_typ is a pointer ( #10775 )
2021-07-15 08:38:03 +03:00
spaceface
6e942bf4c2
v: initial support for generic interfaces and sumtypes ( #10795 )
2021-07-15 08:29:13 +03:00
crthpl
5089eb4a84
parser: fix pointer cast expressions hack ( #10777 )
2021-07-13 12:01:24 +03:00
Delyan Angelov
85564b7b83
vinix: support -os vinix (part 1)
2021-07-13 11:24:09 +03:00
shadowninja55
7694afa44c
checker: check that `mut` args are lvalues ( #10779 )
2021-07-13 08:06:39 +03:00
shadowninja55
02f0a30555
checker: ensure hex character literals don't overflow in strings ( #10725 )
2021-07-12 22:37:31 +03:00
yuyi
5c7881feb7
checker: fix error of for_in alias ( #10770 )
2021-07-12 09:17:00 +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
c65bfc122d
checker: check assigning array_init with no type ( #10757 )
2021-07-11 18:52:01 +03:00
shadowninja55
b222e4efae
checker: change expr depth limit to 150 ( #10745 )
2021-07-10 20:24:53 +03:00
Louis Schmieder
eb96ad11d9
checker: add pkgconfig to comptime if ( #10692 )
2021-07-09 18:17:04 +03:00
shadowninja55
aa5b609d95
checker: check integer literals ( #10706 )
2021-07-09 14:02:10 +03:00
Delyan Angelov
972cbe2e9a
serenity: add more support
2021-07-09 11:33:51 +03:00
yuyi
fb9b2e873c
checker: fix generic fn with assign reference generic struct ( fix #10681 ) ( #10695 )
2021-07-08 16:50:25 +03:00
Alexander Medvednikov
9ba6c23d5c
checker: casted => cast
2021-07-08 05:11:12 +03:00
shadowninja55
806d6172cb
checker: prohibit casting `void` ( #10690 )
2021-07-07 21:59:58 +03:00
shadowninja55
f070222124
checker: prohibit option and `IError` in multi-return ( #10689 )
2021-07-07 11:57:10 +03:00
yuyi
c4b5805890
checker: check generic method call args mismatch ( #10669 )
2021-07-05 10:14:00 +03:00
Delyan Angelov
972542d6ee
checker: `[noreturn]` part 2 (cleanup) ( #10667 )
2021-07-05 05:05:37 +03:00
Delyan Angelov
6aecda3be8
all: support `[noreturn] fn abc() { for{} }`, mark panic/1 and exit/1with it too. ( #10654 )
2021-07-04 20:24:19 +03:00
yuyi
b0b4b8e65b
checker: fix missing check generic fn call args ( fix #10649 ) ( #10657 )
2021-07-04 19:15:15 +03:00
yuyi
665279938e
checker: fix nested generic struct init ( fix #10652 ) ( #10659 )
2021-07-04 18:37:31 +03:00
shadowninja55
8c43d2450f
vweb: prohibit invalid parameter types in vweb app methods ( #10631 )
2021-07-04 18:37:09 +03:00
Daniel Däschle
0f9537ece5
all: remove ustring ( #10630 )
2021-07-03 20:14:09 +03:00
yuyi
e4d88a5be5
v.checker: minor cleanup of fn_call() ( #10632 )
2021-07-02 19:45:12 +03:00
yuyi
abbf71c794
ast.table: cleanup type_implements_interface() ( #10643 )
2021-07-02 10:18:04 +03:00
Delyan Angelov
a33a2ba095
checker: check for `x := []Interface{len: 9}` without `init:`
2021-07-02 08:37:49 +03:00
div72
9d02ca51d1
checker: relax naming requirements for translated code ( #10619 )
2021-06-30 14:47:13 +03:00
yuyi
1e896c7020
checker: check optional interface type mismatch ( #10617 )
2021-06-30 08:54:28 +03:00
shadowninja55
f029f7e897
checker: prohibit `char.str()`, add tests ( #10615 )
2021-06-30 08:16:31 +03:00
shadowninja55
f45f30a9c2
checker, cgen: fix aliased array methods ( #10603 )
2021-06-29 12:14:37 +03:00
shadowninja55
06a6a8e199
checker: check for empty branches in match expressions ( #10593 )
2021-06-28 19:32:28 +03:00
shadowninja55
ea3983a91b
checker: require .sort() body for some types ( #10550 )
2021-06-27 17:17:03 +03:00
shadowninja55
eb5afb7403
checker: prohibit selective const imports ( #10574 )
2021-06-26 18:09:52 +03:00
Delyan Angelov
19dca026a9
checker: bugfix for `__global ( cpu_get_id fn () u64 ) ... cpu_get_id()`
...
Support new vlib/v/checker/tests/globals_run/ folder, for .vv files
that will be run with `-enable-globals run`, and the results will be
compared with their matching `.run.out` files.
Add regression tests.
2021-06-26 01:23:50 +03:00
Alexander Medvednikov
7458927593
checker: fix global fn calls
2021-06-25 20:26:24 +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
shadowninja55
83eb9d5d07
checker: disallow accessing fields or methods of `void` ( #10552 )
2021-06-24 07:33:12 +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
Delyan Angelov
79df7f51c3
v: deprecate `[if ident]` in favour of `[if ident ?]`
2021-06-22 10:30:14 +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
Enzo
44d0305ca9
checker,gen: remove automatic string to C string conversion ( #10144 )
2021-06-20 09:30:08 +03:00
yuyi
2298063129
checker: fix nested if smartcast selector exprs ( fix #10372 #10379 ) ( #10502 )
2021-06-18 14:49:15 +03:00
Delyan Angelov
a01e8eb0f8
v.checker: implement `-d debug_manualfree`, noticing `[manualfree]fn f(s string){return s}`
2021-06-18 13:06:52 +03:00
zakuro
751f2950ea
checker: skip checking `[required]` fields for struct update syntax ( #10500 )
2021-06-18 02:51:33 +03:00
Delyan Angelov
39e7290416
v: support for `[if expr]`, part 2 (old `[if ident]` is not yet deprecated)
2021-06-17 18:55:20 +03:00
yuyi
c58b04bcbf
checker: implement if smartcast multi conds (part 2) ( #10487 )
2021-06-17 12:27:31 +03:00
Alexander Medvednikov
eacdd0d7e1
comptime: fix $(field.name) in $for; vweb: shared fields
2021-06-16 20:33:39 +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
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
bdc8586ddd
checker, cgen: fix `for in mut val` ( #10444 )
2021-06-15 04:43:10 +03:00
yuyi
e5debbbe01
checker: implement smartcast if multi conds (part 1/2) ( #10452 )
2021-06-14 18:10:29 +03:00
Emily Hudson
535dcac8fa
net: ipv6 support, merge unix+ip;[pack:x] attribute ( #9904 )
2021-06-13 23:53:38 +03:00
yuyi
cab054c1ba
checker: simplify checking array append type mismatch ( #10422 )
2021-06-13 06:29:40 +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
2ff0f62866
v: fix passing `-arch arm64` to `$if arm64{}`
2021-06-13 01:15:35 +03:00
Alexander Medvednikov
9ac661be5a
checker: use a correct type name in an error
2021-06-12 17:28:30 +03:00
pancake
3b6045865b
checker: improve error message when using fields as methods ( #10367 )
2021-06-12 15:15:25 +03:00
Alexander Medvednikov
635f045b14
ast: make is_int() work with aliases
2021-06-12 14:35:38 +03:00
Alexander Medvednikov
6761697088
checker: do not allow dereferencing function calls on the left side of an =
2021-06-11 16:07:41 +03:00
crthpl
6576d876fc
cgen: support a `[_naked]` fn attribute ( #10418 )
2021-06-11 11:03:39 +03:00
yuyi
7878bad95e
checker: check array type mismatch of array append ( #10405 )
2021-06-10 21:34:36 +03:00
shadowninja55
10b9ea3258
checker: add an error for assigning to array slices `a[..2] = [0, 0]` ( #10412 )
2021-06-10 19:18:14 +03:00
Delyan Angelov
115edff7e9
v.checker: restrict `x T` in `fn test<T>(x T){ unsafe{ println(x[0]) }`, but allow `x &T`
2021-06-09 12:07:08 +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
49de1f8e64
checker: cleanup in infix_expr() ( #10368 )
2021-06-09 00:06:29 +03:00
yuyi
103c777ad6
checker: check generic type indexing error ( #10345 )
2021-06-08 17:23:44 +03:00
yuyi
0615f2e236
checker: check generic method receivers with no type parameter ( #10374 )
2021-06-07 12:11:29 +03:00
crthpl
8a497080b3
cgen: fix assembly in generic fns ( #10370 )
2021-06-07 10:53:33 +03:00
Lukas Neubert
c14b357fec
checker: fix enums in builtin ( #10366 )
2021-06-06 16:27:46 +03:00
Lukas Neubert
3f00ff465b
checker: check or block inside println calls ( #10354 )
2021-06-05 23:01:58 +03:00
yuyi
8af7558e0c
checker: minor cleanup of return_stmt() ( #10315 )
2021-06-05 14:06:48 +03:00
Lukas Neubert
dc431a3c47
checker: prevent enum value duplication check bypass ( #10287 )
2021-06-05 12:28:17 +03:00
crthpl
9553c5a4e6
parser: fix multiple output modifiers in asm ( #10347 )
2021-06-04 23:18:11 +03:00
yuyi
f4486d79c3
checker: minor cleanup of selector_expr() ( #10316 )
2021-06-03 16:49:50 +03:00
yuyi
fedf07ddd8
checker: minor cleanup of assign_stmt() ( #10314 )
2021-06-03 09:49:03 +03:00
yuyi
86d70fade7
checker: minor cleanup of struct_init() ( #10310 )
2021-06-03 09:48:19 +03:00
yuyi
1747e546bf
parser, checker: check assert optional ( #10319 )
2021-06-02 20:38:26 +03:00
yuyi
cb19079d53
all: move cur_concrete_types to Table ( #10269 )
2021-05-31 17:14:45 +03:00
Louis Schmieder
38796521fa
all: allow defer use from other scope ( #10284 )
2021-05-31 14:43:44 +03:00
Delyan Angelov
eac1e25c5d
strings: simplify Builder ( #10263 )
2021-05-31 14:21:06 +03:00
yuyi
5aa4f622b6
checker: fix match expr returning optional ( #10281 )
2021-05-31 12:34:55 +03:00
Lukas Neubert
09e3099580
checker: error on direct map alias init ( #10282 )
2021-05-31 12:14:37 +03:00