Commit Graph

826 Commits (76c67952e6052cd5f0a846eec7d80f88fee71cc5)

Author SHA1 Message Date
Alexander Medvednikov bc8aab4775 checker: fix := test 2020-09-09 17:59:51 +02:00
Alexander Medvednikov 3956ea4665 Revert "checker: fix := test"
This reverts commit 818220de45.
2020-09-09 17:55:48 +02:00
Alexander Medvednikov 818220de45 checker: fix := test 2020-09-09 17:50:14 +02:00
Daniel Däschle 3a146a6dbe
checker: fix error pos on default value (#6338) 2020-09-09 15:34:41 +02:00
Alexander Medvednikov 925f1781b3 checker: default field fixes 2020-09-09 14:05:56 +02:00
Alexander Medvednikov e018509ba6 checker: test for unnecessary default struct field values 2020-09-09 13:59:52 +02:00
Swastik Baranwal ea2b2ebc07
checker: modify error messages for ptrs (#6325) 2020-09-09 10:07:58 +02:00
Nick Treleaven 49c322f120
checker: simplify argument qualifier errors (#6321) 2020-09-08 19:34:17 +02:00
Uwe Krüger 2cb711ee15
checker/channels: check `mut`/`&` state of transmitted objects (#6315) 2020-09-06 21:24:41 +02:00
Xavier B 8ef55bd8c9
checker: add checks for map key/value types (#6283) 2020-09-04 23:59:54 +02:00
spaceface777 35cbca96e1
checker: implement `[required]` struct field attribute (#6276) 2020-08-31 23:15:40 +02:00
spaceface777 bd304f1141
checker: check number of fields in short struct inits (#6280) 2020-08-31 22:17:59 +02:00
Nick Treleaven 7dbae14e19
checker: error on `mut name =` (#6247) 2020-08-28 20:07:32 +03:00
Swastik Baranwal 39bf02ea68
checker: add error for arr1 <,>,>=,<= arr2 (#6243) 2020-08-28 11:08:07 +03:00
Delyan Angelov f73506be49 tests: fix some byte->rune errors 2020-08-27 12:08:05 +03:00
Delyan Angelov 99dd72efea tests: add another test for 47f59d3 2020-08-26 11:46:29 +03:00
Delyan Angelov 47f59d3fb6 v.scanner: fix error line numbers when comments end with CRLF 2020-08-26 11:39:32 +03:00
Delyan Angelov 86dfd3902f tests: use .vv files directly in compiler_errors_test.v 2020-08-25 18:14:06 +03:00
Nick Treleaven acc5c95f0d
checker: error with `*expr` if not a pointer (#6211) 2020-08-24 17:19:17 +02:00
Swastik Baranwal b2e79dbebd
parser: add an error for `import mod.sub as mod` and `import mod as mod` (#6194) 2020-08-23 02:12:25 +02:00
Daniel Däschle fcc61a981d
all: TypeSymbol.source_name (#6187) 2020-08-22 12:29:15 +02:00
Delyan Angelov 06967d9297 sort: require a mutable receiver 2020-08-21 21:19:37 +03:00
Nick Treleaven 217f04e311
checker: disallow casting to bool, use `some_int != 0` instead (#6138) 2020-08-19 14:37:55 +02:00
Swastik Baranwal 46b4e2a0cd
checker: check`match` types (#6149) 2020-08-17 20:19:21 +02:00
Uwe Krüger 9a5f040f72
all: handle `<-` arrow token for channel operations (#6152) 2020-08-17 20:12:00 +02:00
Nick Treleaven 6ba6a22a77
checker: prevent from casting non-struct to struct (#6143) 2020-08-17 11:19:44 +02:00
Alexander Medvednikov b2059c481a checker: fix an incorrect name test 2020-08-16 19:24:00 +02:00
Alexander Medvednikov f965ddae49 parser: handle several errors in types; cgen: objC includes 2020-08-16 19:16:59 +02:00
Enzo a02593204f
checker: forbid aliasing an alias (#6118) 2020-08-16 04:53:16 +02:00
Daniel Däschle b2fee21ef3
checker: check struct casting (#5864) 2020-08-14 14:57:08 +02:00
Alexander Medvednikov fc1f41fc84 checker: fix a string error test 2020-08-13 23:33:18 +02:00
Delyan Angelov da7adb5b1b ci: fix failing tests for compiler_errors_test.v 2020-08-13 13:16:41 +03:00
Swastik Baranwal 9fdb1701e0
checker: add a check for str[i] = `a` (#6107) 2020-08-11 17:41:54 +02:00
Alexander Medvednikov c5aa2bfa51 tests: fix a match test 2020-08-11 16:26:52 +02:00
Alexander Medvednikov 2dd82748e0 checker: simplify << error message 2020-08-11 01:01:33 +02:00
Delyan Angelov 36eae1c175
builtin: x.vstring() instead of string(x) (#6102) 2020-08-10 18:05:26 +02:00
Nick Treleaven 6cc8815931
parser: support [unsafe] instead of [unsafe_fn] (#6066) 2020-08-08 16:24:05 +02:00
Delyan Angelov 91c9c0c917 checker: fix unknown_method_suggest_name.out test result too 2020-07-30 19:37:36 +03:00
Delyan Angelov f300f787f3 checker: add suggestions for method mispellings and unknown types 2020-07-30 18:48:16 +03:00
Delyan Angelov 9c9533dad9
checker: add error for `fn f() Struct { return &Struct{} }` (#6019) 2020-07-29 21:40:43 +02:00
Swastik Baranwal 4500e7131e
checker: add a checker error for fn calls on left side of an assignment (#5993) 2020-07-29 18:33:00 +03:00
Delyan Angelov 9c028bb299 checker: fix passing enum to a method expecting string 2020-07-28 13:50:40 +03:00
Delyan Angelov 9d056168ae ci: fix failing tests 2020-07-26 10:48:24 +03:00
Alexander Medvednikov 6796b93abd tests: fix compiler_errors_test.v 2020-07-25 22:20:10 +02:00
Alexander Medvednikov 7c86156be5 checker: fix unsafe tests 2020-07-25 18:58:23 +02:00
Nick Treleaven ee349691f9
v/checker: Warn about pointer indexing outside unsafe {} (#5918) 2020-07-22 20:28:53 +03:00
spaceface777 f4251dded0
checker: suggest using `:=` when assigning to undefined variable (#5911) 2020-07-21 19:49:53 +03:00
Nick Treleaven 15ca64d81d
tests: rename pointer_arithmetic_should_be_checked.vv -> unsafe_required.vv (#5897) 2020-07-20 23:04:22 +03:00
Nick Treleaven a74cbf55c7
checker: warn if C.m* or C.s* functions are called outside unsafe blocks (#5869) 2020-07-20 20:06:41 +03:00
Nick Treleaven e6fc8eb015
checker: check that array slicing indexes are valid (#5892) 2020-07-20 19:52:03 +03:00
Delyan Angelov fb4c3ff31a tests: split unsafe.v to vlib/v/tests/unsafe_test.v and a checker output .vv&.out test 2020-07-20 16:53:27 +03:00
Ryan Willis 1114fd28d0
all: import individual symbols feature (#5872) 2020-07-18 21:34:38 +02:00
spaceface777 3583302ad4
parser: force `...` rather than `..` in matches for inclusive ranges (#5852) 2020-07-17 11:30:21 +03:00
spaceface777 b900577dae
compiler: handle ranges as `match` conditions (#5847) 2020-07-16 16:41:18 +03:00
Enzo 2ee8f93d60
parser: duplicate method declaration on interface (#5825) 2020-07-15 10:23:21 +02:00
Alexander Medvednikov 06f5279f77 checker: fix multi_const_field_name_duplicate test 2020-07-14 17:44:08 +02:00
Alexander Medvednikov 899c69caf1 checker: fix dup const test 2020-07-14 17:24:08 +02:00
Uwe Krüger aa364ddaca
checker, cgen: checks for shared/lock, first autolock (#5815) 2020-07-13 12:19:28 +02:00
yuyi 9b4c81e85f
checker: check missing return values in functions (#5803) 2020-07-11 16:30:49 +02:00
Delyan Angelov 37d739684c checker: prevent string(byte), suggest byte.str() instead 2020-07-11 17:09:22 +03:00
pancake 7d6ba2d07d
checker: add error when interface i, without a .str() method, have i.str() called (#5788) 2020-07-10 22:47:29 +03:00
Daniel Däschle fb927dab60
checker: check all branches for return (#5763) 2020-07-09 22:38:43 +02:00
Daniel Däschle c5dc1a33b6
all: remove `it` smartcast and replace with original variable name (#5764) 2020-07-09 17:14:14 +02:00
yuyi fc7237be7b
checker: fix cast to sum type (fix #5690) (#5692) 2020-07-06 12:32:59 +02:00
yuyi f41edef4c6
checker: add `1/0x0 1/0b0..` division by zero check (#5694) 2020-07-06 12:32:00 +02:00
yuyi 34a24eaa4e
checker: validate loop var names (#5677) 2020-07-05 15:27:37 +02:00
Delyan Angelov f374e37b61 checker: add details about a non matching functional argument 2020-07-04 22:37:06 +03:00
Delyan Angelov 0637feb382 checker: use a more readable error message for non matching fn args 2020-07-04 21:23:22 +03:00
div72 be04de98bb
checker: check for enum value duplicates/overflow (#5659) 2020-07-04 18:28:01 +03:00
Delyan Angelov 35431d457b checker: add check for strict .str() method signature 2020-07-04 14:14:43 +03:00
Alexander Medvednikov 3d3549d65a Revert "parser: advanced division by zero check (#5629)"
This reverts commit f03688e443.
2020-07-03 22:30:51 +02:00
yuyi f03688e443
parser: advanced division by zero check (#5629) 2020-07-03 11:28:00 +02:00
Uwe Krüger 8a46911725
checker: check if mut function arg is declared as mut (#5579) 2020-06-30 14:19:22 +02:00
joe-conigliaro ab37dcaa9c
generic structs: initial implementation 2020-06-29 20:09:09 +02:00
Uwe Krüger 8fe70a24a8
checker: forbid non-reference mut arg or receiver of go function 2020-06-26 23:31:38 +02:00
yuyi 7efb3ecb34
checker: check deprecated functions 2020-06-23 16:25:24 +02:00
yuyi e2b5debc6b
checker: check optional type call 2020-06-23 11:39:58 +02:00
yuyi ed393896f5
checker: check printing of optional type 2020-06-23 11:38:30 +02:00
Uwe Krüger 37927235cd
parser: trigger declaration of array element as error 2020-06-20 14:30:03 +02:00
joe-conigliaro ddd83f1fc6
checker: error if variable used before declaration 2020-06-20 12:42:08 +10:00
Uwe Krüger c78cfa43bc
checker: make map literals have a real type 2020-06-19 15:00:27 +02:00
Alexander Medvednikov 5f5228f0f3 test: fix `as` checker test 2020-06-19 11:48:19 +02:00
Alexander Medvednikov 274ecb71fa checker: `as` type test 2020-06-19 11:27:20 +02:00
yuyi 5a6d440f68
checker: check `array_insert` `array_prepend` type mismatch 2020-06-19 10:49:43 +02:00
joe-conigliaro d478b44915
parser/checker/gen: merge AssignExpr & AssignStmt into just AssignStmt 2020-06-16 21:20:16 +10:00
yuyi 2daf915371
parser: `expression evaluated but not used` error 2020-06-16 11:06:53 +02:00
Uwe Krüger f2d9fa3815
cgen: restructure string_inter_literal() 2020-06-16 10:41:51 +02:00
joe-conigliaro 0cd9066f44
parser/cgen: multiple attributes & better errors (closes #5334) 2020-06-15 22:59:09 +10:00
yuyi 2785a5bf65
checker: check return_duplicate_with_none (closes #5363) 2020-06-15 15:10:45 +10:00
Ruofan XU 90279a7108
checker: use ++ / -- instead of += 1 / -= 1 2020-06-14 19:05:05 +02:00
Swastik Baranwal a3a91f54a9
checker: handle `!is` in error messages 2020-06-14 19:03:29 +02:00
yuyi 90f07eb64a
parser: fix fn attributes empty error 2020-06-12 18:27:05 +02:00
Swastik Baranwal 56ae3797dd
checker: add checks and test for ~ operator 2020-06-12 12:05:20 +02:00
yuyi a66753871d
checker: check array.map/filter fn or anon_fn 2020-06-11 13:14:07 +02:00
Enzo Baldisserri 11b7b97311
parser: fail when assigning to _ with := 2020-06-08 00:47:04 +02:00
yuyi c9b395f9cf
checker: fix for_in_index type error 2020-06-05 09:44:25 +02:00
yuyi dd7ebf7fac
parser: check function argument mutable syntax 2020-06-04 15:20:43 +02:00
yuyi 8a24d7d723
checker: optional return fix 2020-06-04 10:40:32 +02:00
Swastik Baranwal d286f67220
parser: update check for non mut types in fn 2020-06-03 18:47:18 +03:00
yuyi 1060de88af
parser: fix function mutable argument error 2020-06-03 12:28:16 +02:00
Alexander Medvednikov 00978da2c4 checker: fix mut int test 2020-06-03 10:45:19 +02:00
Alexander Medvednikov 888a43a684 checker: fix mut int test 2020-06-03 10:40:41 +02:00
Alexander Medvednikov 199f4f006b checker: fix mut int check 2020-06-03 10:36:56 +02:00
yuyi d0ff9a7c4a
parser: correct fn arg position in error message 2020-06-03 08:42:02 +03:00
yuyi 1386c5df13
parser: use `?` instead of `?void` errpr 2020-06-02 17:24:24 +02:00
Uwe Krüger 076089d3c5
checker: apply stricter type checks to function args and return types 2020-06-01 21:15:59 +02:00
Delyan Angelov ae8f7cf569 tests: fix some tests, that failed due to the stricter immutable checks 2020-06-01 18:24:38 +03:00
Uwe Krüger faf3248e98
checker: check types for bitwise right shift 2020-05-31 12:58:13 +02:00
yuyi 1e504fb388
parser: check undefined variable of assign_expr 2020-05-29 17:38:40 +02:00
yuyi 28ffe2a6ee
checker: add error for struct fields of type []unknown 2020-05-28 19:38:53 +03:00
yuyi 977eb895e8
checker: check array init's element type 2020-05-28 13:32:12 +02:00
yuyi 84edbd83da
all: fix struct names error 2020-05-27 19:12:34 +03:00
Alexander Medvednikov 670820cc59 parser: do not allow 1 char struct names 2020-05-27 16:00:00 +02:00
Uwe Krüger 013fdb8a4b
checker: restrict numeric promotions to cases where no data is lost 2020-05-27 05:42:48 +02:00
Delyan Angelov b0cfd3fa67
parser: reimplement [flag] enum support. Add p.vcodegen too 2020-05-26 00:00:48 +03:00
yuyi 30ca08aaa3
parser: fix self-referenced error 2020-05-25 11:31:04 +02:00
Delyan Angelov a0f8005352 checker: support tests/run/ folder, checks many warns/errors/output 2020-05-24 21:13:09 +03:00
yuyi 641fe5c864
checker: fix unresolved variables error on assignments 2020-05-24 20:33:53 +03:00
yuyi 4608898bcd
checker: fix multiple assign immutable error 2020-05-23 17:30:28 +02:00
Enzo Baldisserri 801bca1ef2
compiler: propagate optional 2020-05-23 08:51:15 +02:00
yuyi dda875a9c8
all: unify const names to snake_case 2020-05-22 17:36:09 +02:00
Ruofan XU b2b0461218
scanner: fix err pos related to num literal 2020-05-21 18:43:57 +02:00
Ruofan XU aba09a7e4d
scanner: fix err pos related to num literals 2020-05-21 16:20:36 +03:00
Alexander Medvednikov abb15275f5 checker: update a `for in` error test 2020-05-21 06:06:11 +02:00
Don Alfons Nisnoni 10ad5332e8
parser: improve unused imports warning 2020-05-20 20:50:27 +03:00
Swastik Baranwal d697b2848a
checker: more checks for in and !in 2020-05-17 17:03:32 +02:00
yuyi 7f4cf08516
parser: check `(mut f Foo)` syntax 2020-05-17 13:51:18 +02:00
yuyi 02fb393747
test: fix vrepl and cast test errors 2020-05-17 02:13:08 +02:00
Enzo Baldisserri f44a40eee0
checker: check incorrect names 2020-05-16 16:12:23 +02:00
Swastik Baranwal 37cf46d67a
checker: add more checks for modulo 2020-05-16 15:32:46 +02:00
Enzo Baldisserri fd0d833e33
gen: if expressions with multiple statements 2020-05-14 17:15:25 +02:00
yuyi 6d0b791ac8
parser: warning about unused imports 2020-05-14 17:14:24 +02:00
yuyi 70b76a8e31
builder: use verror for not found modules 2020-05-14 10:59:29 +03:00
Delyan Angelov d830620651 compiler: restore support for --enable-globals flag, and add tests. 2020-05-14 08:43:12 +03:00
Enzo Baldisserri 1ca04e6113
checker: prevent interface instantiation 2020-05-13 19:20:15 +02:00
yuyi 2e0b9de31c
parser: error for consts in fns 2020-05-13 18:39:02 +02:00
yuyi b1511ce995
parser: optimize no main file process 2020-05-13 14:02:04 +02:00
yuyi 99b31d8241
parser: unified way to handle struct and enum name check 2020-05-12 13:39:32 +02:00
Kris Cherven 8bc0c31f29
parser: add error for variables, that are evaluated, but not used 2020-05-11 11:13:36 +03:00
Kris Cherven 3a3d00ac72
checker: prevent C error on const mutation 2020-05-11 11:09:58 +03:00
Alexey 71c2b26103
checker: fix checking uninitialized refs 2020-05-10 22:26:47 +02:00
yuyi 7f69c2fbf5
parser: check `import` in the middle of file error 2020-05-10 07:47:20 +03:00
yuyi ba3a631954
parser: check for module statement errors 2020-05-10 02:28:56 +02:00
yuyi 85723e3799
checker: check for_in_map using one variable error 2020-05-10 02:28:43 +02:00
yuyi 3eeef6203e
checker: check for map_init key duplicate 2020-05-09 16:55:38 +02:00
yuyi 5f435fa1cc
parser: check enum name and field name errors 2020-05-09 12:43:10 +02:00
Sandro Martini 910a8934cb
checker: fix typo on error message and related test 2020-05-08 21:21:47 +03:00
Ned Palacios 5b47ec49af
parser: add support for multiple struct field attributes 2020-05-08 15:09:42 +02:00
yuyi ef505e21ee
parser: check for import errors 2020-05-08 16:01:54 +03:00
Delyan Angelov 673acdbd00 tcc: fix selfcompilation with tcc. Temporarily disable crashing interface test 2020-05-07 20:59:45 +03:00
yuyi 78efe72c4c
checker: optimize check string cast error 2020-05-07 12:34:06 +02:00
Enzo Baldisserri 0f8ed84333
checker: verify interface is not used as receiver 2020-05-07 11:14:51 +03:00
Don Alfons Nisnoni e87289f24d
Fix typo on checker 2020-05-06 13:57:40 +03:00
yuyi 51f3f31a4e
checker: check string(1) cast error 2020-05-06 12:05:24 +02:00
Enzo Baldisserri 215657e16a
checker: check interface implementation 2020-05-06 11:29:37 +02:00
Enzo Baldisserri c1f224640f
checker: verify that there is a main module 2020-05-06 00:09:46 +02:00
Alexander Medvednikov 2a016d03ac checker: use `[]int` instead of `array_int` in errors 2020-05-03 16:49:05 +02:00
Alexander Medvednikov b0018ed594 checker: better << error 2020-05-02 16:48:52 +02:00
yuyi b21be7f670
parser: multiple names error 2020-05-01 18:18:58 +02:00
yuyi de272654f1
repl: fix import xxx with no fn main error 2020-05-01 18:12:18 +02:00
eyelash 4d04e88679
errors: show line numbers in default color and add a space 2020-05-01 14:46:12 +02:00
yuyi 5481c0fc84
parser: uniform handling of enum field format 2020-04-30 12:18:16 +02:00
yuyi 81ed6ad2a1
checker: check duplicate consts 2020-04-30 12:17:31 +02:00
yuyi 4d415e56d6
checker: check enum field name duplicate 2020-04-30 09:34:18 +02:00
yuyi c4f672454f
checker: check import duplicates 2020-04-30 09:33:12 +02:00
Henrixounez f6d74c8a37
checker: error on ternary if type mismatch 2020-04-30 09:32:29 +02:00
Tim Basel 3e4cd12fd0
.gitignore: ignore all binary files by default 2020-04-29 16:49:13 +02:00
Henrixounez c500044bae
checker: unreachable code warning 2020-04-29 12:31:18 +02:00
Delyan Angelov 1e910c6afe tests: add reference_field_must_be_initialized.vv 2020-04-29 12:56:12 +03:00
Delyan Angelov dd3434598c checker_test: remove generated .v files, when a test is OK 2020-04-29 11:48:51 +03:00
yuyi 117649f40d
checker: check devision by zero (int and float) 2020-04-29 10:07:27 +02:00
yuyi 2b48ce21df
checker: make sure `main` has no args and doesn't return 2020-04-29 09:19:46 +02:00
yuyi a9e33e712a
checker: check struct field name duplicate 2020-04-29 09:11:36 +02:00
Delyan Angelov 8c526ad05b tests: ignore vlib/v/checker/tests/*.v files (only *.vv are sources there) 2020-04-28 16:45:25 +03:00
Henrixounez 0afaef5818
checker: ambiguous function call error
* checker: ambiguous function call error

* checker: ambiguous function call error wording

* checker: ambiguous functions tests newline
2020-04-28 16:27:49 +03:00
Enzo Baldisserri 7bf8731778
checker: check variable mutability for postfix exprs 2020-04-28 11:20:19 +02:00
yuyi f2060d431e
checker: check division by zero 2020-04-28 09:52:01 +02:00
yuyi b20777df59
checker: main function called error 2020-04-28 07:21:50 +02:00
Enzo Baldisserri 682838a0cf
checker: check array and fields mutability 2020-04-27 22:53:26 +02:00
Enzo Baldisserri 0f2f97e3e5
checker: reorganize tests to match fmt tests 2020-04-26 12:34:42 +02:00
Alexander Medvednikov 20bcb6b8bb tests: fix lef_shift test 2020-04-26 09:29:29 +02:00
Alexander Medvednikov 7955181c6c tests: [] fixes 2020-04-26 09:18:29 +02:00
Delyan Angelov 48f9cc1ed7 tests: make alias_type_exists.vv use `type Pigeon Bird` syntax 2020-04-26 08:23:09 +03:00
Enzo Baldisserri 0b3412cdb5
checker: check that type exists in TypeDecl 2020-04-26 06:40:54 +02:00
Enzo Baldisserri 3e68e429b6
checker: avert if else is unnecessary 2020-04-25 21:51:44 +02:00
Enzo Baldisserri c73d91a8fe
fmt: TypeDecl; format more files 2020-04-25 20:58:00 +02:00
yuyi c26e83f58a
array: fix fixed array errors 2020-04-25 18:26:38 +02:00
Enzo Baldisserri a924defb94
checker: check `in` left type 2020-04-25 06:14:17 +02:00
Enzo Baldisserri fa4739794f
checker: fix "unnecessary `()`" error position 2020-04-24 20:27:18 +02:00
Enzo Baldisserri 323ca2b3bb
checker: check duplicates on match with no else
Refactor match duplication test to work even if there is not else, and to include every expression.
Add tests for duplicate expressions in match.
2020-04-24 17:04:39 +03:00
Alexander Medvednikov d7ee4755c2 parser/cgen: interfaces (part 1) 2020-04-22 20:23:53 +02:00
Kris Cherven 155891a4e0
parser: add unused variable warning 2020-04-22 01:52:56 +02:00
yuyi a8dc0ccbcd
checker: add more op checks 2020-04-21 13:26:02 +02:00
Ruofan XU f725b93019
tests: delete an unused file 2020-04-20 21:48:14 +02:00
Ruofan XU cdb1b0344c
checker: improve type check for arithmetic assignment op and fix error pos 2020-04-20 20:56:05 +02:00
yuyi 717e26b45e
checker: more infix checks 2020-04-20 14:49:26 +02:00
yuyi 07f69fab19
checker: remove dots from error messages 2020-04-20 11:57:07 +02:00
Alexander Medvednikov 4b329cb89d tests: fix a typo 2020-04-20 08:32:10 +02:00
Alexander Medvednikov 639dc02cc8 x64: test hello world 2020-04-20 08:27:37 +02:00
yuyi be3bd520f6
checker: fix for in range type mismatch 2020-04-20 00:21:16 +02:00
Ruofan XU 5edd9cdc3a
checker: add type check for bit op 2020-04-19 22:29:45 +02:00
yuyi dbb81b89fd
checker: fix type mismatch of `in` array 2020-04-19 22:26:58 +02:00
Ruofan XU 6c59b306c7
checker: add type check for arithmetic assignment ops 2020-04-19 22:24:12 +02:00
yuyi 4de16e9f0f
tests: enable checker_error_test on windows 2020-04-19 20:48:13 +02:00
Enzo Baldisserri 57c142b993
checker: disallow pub in main 2020-04-19 00:07:57 +02:00
Enzo Baldisserri 0f9322bf36
checker: print error and pos for lacking main or pub main 2020-04-18 00:20:38 +02:00
Enzo Baldisserri f2be3d7ffb
checker: check that right `is` type exists 2020-04-18 00:19:33 +02:00
Alexander Medvednikov ed8855c4cd tests: fix struct_unknown_field.v 2020-04-17 17:20:35 +02:00
Alexander Medvednikov 06c1b9e95e table/checker: verify private functions/methods 2020-04-17 17:16:14 +02:00
Daniel Däschle af30bf939e
checker: fix return underlining 2020-04-17 16:16:56 +02:00
Daniel Däschle 402e55d115
ast: expr.Position; struct field refactoring 2020-04-17 02:38:39 +02:00
Daniel Däschle 19723c927b
checker: move more checks from parser 2020-04-16 12:17:15 +02:00
Delyan Angelov 8a1248b2e7 builder: restore module import cycle detection/topological reorder 2020-04-16 12:29:36 +03:00
Daniel Däschle 04db2d02b8
checker: move struct name check from parser to checker 2020-04-16 11:01:18 +02:00
Daniel Däschle 93b942de46
parser: fix a match error 2020-04-15 16:23:03 +02:00
Enzo Baldisserri 86402204a7
checker: fail if else isn't the last branch of match 2020-04-14 20:31:51 +02:00
Daniel Däschle 50871d1a92
checker: for in index type error position 2020-04-14 19:37:56 +02:00
Delyan Angelov e947d5e8c8 checker: fully exhaustive matches for sumtypes and enums
Also change the vlib/v/checker/tests/inout/match_expr_else.out to reflex the
new error details.
2020-04-14 16:50:43 +03:00
Daniel Däschle 12e48c6fe2
checker: check match for exhaustion 2020-04-14 01:03:31 +02:00
Daniel Däschle a6100be8df
parser: fix position of array init
* parser: fix position of array init
* fix checker_error_test.v tests
2020-04-13 19:08:02 +03:00
Daniel Däschle 4449468ca4
parser: correct error position on field and method errors 2020-04-12 15:19:07 +03:00
Daniel Däschle c815f84722
parser: fix void assign check 2020-04-10 15:53:06 +03:00
Daniel Däschle 42b3b19af4
checker: fix checker enum infix error 2020-04-10 15:44:01 +03:00
Daniel Däschle adb379dd63
parser: fix string position 2020-04-10 15:40:52 +03:00
Delyan Angelov 3573030b9b checker: fix error position for assignment expression 2020-04-10 15:14:05 +03:00
Daniel Däschle 0f11d883fa
checker: fix error messages and add checker tests
* checker: fix error messages
* tests: fix command and ignore defect output
2020-04-10 11:59:07 +03:00