Commit Graph

633 Commits (88988817d0bdd3c50160125fffecc060cd7d6acd)

Author SHA1 Message Date
Alexander Medvednikov 88988817d0 parser: minor `match` simplification 2020-08-10 19:54:38 +02:00
Delyan Angelov 36eae1c175
builtin: x.vstring() instead of string(x) (#6102) 2020-08-10 18:05:26 +02:00
Alexander Medvednikov c65dbe51d6 parser: c2v fixes 2020-08-09 03:58:14 +02:00
Alexander Medvednikov ea76a33b43 remove freetype references everywhere 2020-08-06 17:23:57 +02:00
Enzo f238890fe9
compiler: move attributes to declarations (#6026) 2020-08-04 20:10:22 +02:00
Nick Treleaven 7f447bb82f
ast: use Block instead of UnsafeStmt (#5981) 2020-08-02 14:06:44 +03:00
Alexander Medvednikov a1593e7db8 checker: 1 line v fmt fix 2020-08-01 23:41:32 +02:00
Swastik Baranwal d56d622a43
checker: add checks for byte casting (#5917) 2020-08-01 23:17:00 +02:00
spaceface777 4f37202b72
checker: allow struct fields starting with capitals in builtin (#5998) 2020-08-01 23:01:40 +02:00
Delyan Angelov f300f787f3 checker: add suggestions for method mispellings and unknown types 2020-07-30 18:48:16 +03:00
Alexander Medvednikov f269cbdc94 Revert "parser: Support `unsafe(expr)` (#5973)"
This reverts commit 19c226fcf8.
2020-07-29 21:41:47 +02: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
Nick Treleaven 19c226fcf8
parser: Support `unsafe(expr)` (#5973) 2020-07-28 11:20:52 +03:00
joe-conigliaro 61c1c4a690
checker: add error for invalid sum type cast `MySt{1}` 2020-07-28 01:04:04 +10:00
Alexander Medvednikov 3d19167628 http: fix cookies (part 2) 2020-07-26 22:01:25 +02:00
Delyan Angelov 9e652c4f40 ci: fix remaining failing tests. Do mut ptr check only outside unsafe{} blocks. 2020-07-26 10:59:07 +03:00
Alexander Medvednikov 34907f7605 checker: do not allow assigning immutable refs to mutable vars 2020-07-25 18:32:36 +02:00
Louis Schmieder b58b15993c
gen: compile time for (methods and fields) (#5957) 2020-07-25 00:02:44 +02:00
Lukas Neubert 2ccb28a93e
checker: run vfmt over checker.v (#5965) 2020-07-24 20:12:01 +03:00
Alexander Medvednikov 632e27a4a9 all: fix a big mutability bug and update all mutable vars 2020-07-23 23:16:36 +02:00
Uwe Krüger 6586a9a657
fmt: give braced sub expressions a higher priority (#5941) 2020-07-23 00:32:34 +02:00
Ryan Willis 938e71b468
v: fix for `import cli { Command }` 2020-07-22 20:33:43 +03:00
Nick Treleaven ee349691f9
v/checker: Warn about pointer indexing outside unsafe {} (#5918) 2020-07-22 20:28:53 +03:00
joe-conigliaro d46a89b90d
parser/checker/fmt: optimize scope lookups by storing object with ident & add if expr smartcast support to vfmt (#5935) 2020-07-23 02:10:31 +10:00
spaceface777 f4251dded0
checker: suggest using `:=` when assigning to undefined variable (#5911) 2020-07-21 19:49:53 +03:00
Alexander Medvednikov 059722f211 checker: minor vfmt run 2020-07-20 22:30:09 +02: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
Enzo 8a855ccae1
fmt,vet: handle `var in [single_value]` (#5882) 2020-07-19 19:58:34 +02:00
Ryan Willis 1114fd28d0
all: import individual symbols feature (#5872) 2020-07-18 21:34:38 +02:00
XeGrox e5a508c0d7
checker: fix inability to access aliased struct fields (#5861) 2020-07-18 13:58:16 +02:00
Nick Treleaven 105a0e015e
checker: warn if unsafe method called outside unsafe block (#5863) 2020-07-17 19:14:12 +02:00
Enzo 90d9040e6e
all: make comment expressions + fix vfmt array init (#5851) 2020-07-17 19:13:22 +02:00
Uwe Krüger ea322bdd97
checker, cgen: fix call of generic function returning normal type (#5865) 2020-07-17 18:28:45 +02:00
spaceface777 3583302ad4
parser: force `...` rather than `..` in matches for inclusive ranges (#5852) 2020-07-17 11:30:21 +03:00
Alexander Medvednikov 9b2cbdacc6 vfmt: verify 2020-07-16 19:46:03 +02:00
Alexander Medvednikov e4fac6ff97 autofree: fix scope position 2020-07-16 19:40:14 +02:00
spaceface777 b900577dae
compiler: handle ranges as `match` conditions (#5847) 2020-07-16 16:41:18 +03:00
Nick Treleaven 4b0ded0475
checker: Warn instead of error for pointer arithmetic (#5840) 2020-07-15 19:59:39 +02:00
Delyan Angelov cf7d03bda6 builtin: implement array.pop() 2020-07-14 20:01:39 +03:00
Delyan Angelov 5ad957f270 vfmt: fix formatting for `x, _ := f()` 2020-07-14 19:11:16 +03:00
Alexander Medvednikov 899c69caf1 checker: fix dup const test 2020-07-14 17:24:08 +02:00
Alexander Medvednikov d33fbe4547 checker: format + fix duplicate const error 2020-07-14 17:18:10 +02:00
joe-conigliaro dd06d90466
checker/gen: temp hack for struct fn type field (fixes ui) 2020-07-14 03:59:00 +10:00
Uwe Krüger 6e6010d198
checker, cgen: implement auto-lock for `a[i]++`, `a[i]--` (#5817) 2020-07-13 15:01:32 +03:00
Uwe Krüger aa364ddaca
checker, cgen: checks for shared/lock, first autolock (#5815) 2020-07-13 12:19:28 +02:00
Nick Treleaven 53023c1ca9
all: add UnsafeExpr (#5793) 2020-07-12 12:58:33 +02:00
Delyan Angelov 9c43d36513 parser,checker: add `-d trace_parser`, `-d trace_checker` 2020-07-12 12:56:01 +03:00