554 Commits

Author SHA1 Message Date
Veikka Tuominen
c9e1360cdb Sema: add "cannot convert to payload type" error notes 2022-07-11 14:17:22 +03:00
Veikka Tuominen
0370006c1f Sema: only add note about int mismatch if not coercible
`unsigned 64-bit int cannot represent all possible unsigned 63-bit values`
is nonsensical.
2022-07-11 11:59:26 +03:00
Veikka Tuominen
34fe2b4f4b Sema: prefer original error message in coerce 2022-07-10 23:47:56 +03:00
Veikka Tuominen
b9f01bc394 Sema: add detailed error notes to coerceInMemoryAllowed 2022-07-10 23:15:17 +03:00
Cody Tapscott
51a8f52e6c stage2: Support @offsetOf for tuples and anon structs 2022-07-08 19:51:35 -07:00
VÖRÖSKŐI András
75c33ba85e Sema: add a note about @setEvalBranchQuota() when branch quota is exceeded
closes #11996
2022-07-08 02:13:33 +03:00
Andrew Kelley
0c78ece1c9
Merge pull request #12016 from Vexu/stage2-compile-errors
Stage2 compile error improvements
2022-07-07 14:52:28 -04:00
emma
81bbefe9b8
AstGen: fix catch payoad not checking for shadowing 2022-07-07 21:38:32 +03:00
Veikka Tuominen
b5ac2b4330 Sema: improve array source location 2022-07-07 10:50:06 +03:00
Veikka Tuominen
27ee414159 Sema: improve slice source locations 2022-07-07 10:50:06 +03:00
Veikka Tuominen
89cef9f5f7 stage2: make line field of @src runtime known 2022-07-07 10:50:06 +03:00
Veikka Tuominen
226994cd7e Sema: misc error message fixes 2022-07-07 10:50:06 +03:00
Veikka Tuominen
c07c2d68c7 Sema: more runtime indexing comptime value checks 2022-07-07 10:50:06 +03:00
Veikka Tuominen
1569b9c165 Sema: validate pointer types 2022-07-07 10:50:05 +03:00
Veikka Tuominen
299836dbd9 Sema: panic at comptime + misc error message improvements 2022-07-07 10:50:05 +03:00
Andrew Kelley
f639cb33a9 fix expected error messages in test cases 2022-07-05 16:22:53 -07:00
Andrew Kelley
844b77e3bc remove sparc64 test case which is tripping llvm assertion
See #12011
2022-07-05 16:22:53 -07:00
Andrew Kelley
2360f8c490
Merge pull request #11974 from ziglang/fixfixfix
stage2 fixes
2022-07-01 17:29:31 -04:00
Veikka Tuominen
2029601cb2 AstGen: use elem_{ptr,val}_node for array access syntax 2022-07-01 10:22:26 +03:00
Veikka Tuominen
a6bf8c2593 Sema: add more validation to zirFieldParentPtr 2022-07-01 10:22:25 +03:00
Veikka Tuominen
e6ebf56dd6 Sema: validate @intToEnum int operand type 2022-07-01 10:22:25 +03:00
Veikka Tuominen
ae7b32eb62 Sema: validate deref operator type and value 2022-07-01 10:22:25 +03:00
Veikka Tuominen
3c73f71177 Sema: prefer func.onwer_decl for compilelog src 2022-07-01 10:22:25 +03:00
Veikka Tuominen
3014a0d5f1 Sema: validate callconv 2022-07-01 10:22:25 +03:00
Veikka Tuominen
6d24c40b6e Sema: improve bitcast to enum error 2022-07-01 09:29:13 +03:00
Andrew Kelley
67db2b85b7 remove plan9 test coverage
This regressed; the plan9 linker code is crashing when trying to build
compiler-rt and we have no active plan9 maintainers involved in the Zig
project. Anyone is welcome to come over and take the role; however, it's
not one of the tier 1, 2, or 3 targets, so we will not be blocking
progress towards 1.0 on plan9.
2022-06-30 18:33:02 -07:00
Veikka Tuominen
4cde6dd109 adjust tests that didn't pass CI 2022-06-30 21:47:26 +03:00
Veikka Tuominen
90ae37cc00 tests: move compile errors not planned for stage2 2022-06-30 09:57:38 +02:00
Veikka Tuominen
cc3336c784 Sema: add source location to coerce result ptr, fix negation error 2022-06-30 09:57:38 +02:00
Veikka Tuominen
979910dc38 Sema: validate shift amounts and switch ranges 2022-06-30 09:57:38 +02:00
Veikka Tuominen
6cadac18b8 Sema: improve auto generated union enum name 2022-06-30 09:57:38 +02:00
Veikka Tuominen
2e7dc5e151 Sema: improve vector overflow errors 2022-06-30 09:57:38 +02:00
Veikka Tuominen
03b356e34a Sema: improve @call errors 2022-06-30 09:57:38 +02:00
Veikka Tuominen
3204d00a5e move passing stage1 compile error tests to stage2 2022-06-30 09:57:38 +02:00
Jakub Konka
914e2d4c99 test: fix spurious whitespace in nested_blocks test 2022-06-28 13:28:09 +02:00
Jakub Konka
6420e9350c test: return error on unknown config value 2022-06-28 13:28:05 +02:00
Andrew Kelley
8caa206417 test-cases: fix race with zig run on C backend tests
Also avoid redundantly doing compile-error checks on multiple targets
for test cases where that is not helpful.
2022-06-14 15:27:43 -07:00
Andrew Kelley
fd32f6890d stage2: fold redundant error notes 2022-06-09 15:37:16 -07:00
Andrew Kelley
434226c89d stage2: fix type printing of sub-byte pointers 2022-06-08 15:18:43 -07:00
Veikka Tuominen
cb5d2b691a Sema: validate equality on store to comptime field 2022-06-06 13:11:50 -07:00
Veikka Tuominen
50a6b0f3ac Sema: fix function type callconv inference 2022-06-04 11:33:18 +03:00
Andrew Kelley
4994ac18e4
Merge pull request #11733 from Vexu/stage2
more misc stage2 fixes
2022-05-27 16:20:49 -04:00
Veikka Tuominen
e08cdad53b Sema: add error for runtime indexing comptime array 2022-05-27 10:29:15 +03:00
Jakub Konka
5ce9c878cf apply Vexu's suggestion to use failing_allocator for now 2022-05-26 16:55:31 +02:00
Jakub Konka
d1e4600675 test: correctly track identical error msgs in handled errors list
Prior to this change, for an example compiler error test case with
multiple identical errors messages such as

```
:1:2: error: foo
:1:2: error: foo
```

the test harness would never increment the error index thus only
marking the very first error message as handled yielding a false
positive.

Additionally, while here, regress `dereference_anyopaque` test case
as not passing on `wasm32-wasi` target.
2022-05-26 16:23:56 +02:00
Veikka Tuominen
92c4e4f2c2 Sema: zirArrayType does need source location 2022-05-26 13:26:55 +03:00
Veikka Tuominen
b0e8bf15f5 Sema: add error for dereferencing comptime value at runtime 2022-05-25 17:39:55 +03:00
Andrew Kelley
7db39384f7 move bound function behavior test to compile error test 2022-05-24 15:34:52 -07:00
Andrew Kelley
953e2778d4 clean up a compile error test case
These should be build-obj, not build-exe, where possible.
2022-05-24 01:20:18 -07:00
joachimschmidt557
b56b4428a3 stage2 ARM: fix recursive fibonacci
Some handling of register_c_flag/register_v_flag was incorrect.
2022-05-22 21:02:32 +02:00