Veikka Tuominen
653c0bae0c
remove stage1 specific compile error tests
2022-12-07 20:32:27 +02:00
r00ster91
f094c4bce5
Sema: detect duplicate enum tag values
2022-12-04 14:12:24 +02:00
Veikka Tuominen
b500e0eb17
Sema: add "parameter type declared here" note to type coercion
2022-12-03 00:48:04 +02:00
Veikka Tuominen
74285a4ed7
add test for error message improved by self-hosted
...
Closes #5099
2022-12-03 00:48:04 +02:00
Veikka Tuominen
f20e449fd6
Sema: improve error for mismatched type in implicit return
...
Closes #2653
2022-12-03 00:48:03 +02:00
Veikka Tuominen
e2509ddbe6
AstGen: add error for invalid string comparisons
...
These operations are allowed because the string literals are just
pointers but they produce unexpected results. These errors prevent
beginners from shooting themselves in the foot while still allowing
advanced users to circumvent them if they desire to do so.
Closes #8290
2022-12-03 00:09:23 +02:00
Veikka Tuominen
59dad43de2
Sema: add error for failed assumption about struct having runtime bits
2022-12-02 18:46:59 +02:00
Veikka Tuominen
86e6acb37b
AstGen: improve error message for missing parameter name
...
Closes #13393
2022-12-02 15:39:40 +02:00
Andrew Kelley
ceb0a632cf
std.mem.Allocator: allow shrink to fail
...
closes #13535
2022-11-29 23:30:38 -07:00
Veikka Tuominen
b2b1d421c3
Sema: add missing failWithBadMemberAccess to zirExport
...
The assumption that AstGen would error only holds when exporting
a identifier not a namespace member.
2022-11-29 21:44:08 +02:00
Veikka Tuominen
4b0ef6a409
Sema: make non-existent field error point to field name
...
Closes #13698
2022-11-29 21:44:08 +02:00
Veikka Tuominen
ed73429926
Sema: explain why parameter must be declared comptime
...
Closes #13692
2022-11-29 21:44:08 +02:00
Veikka Tuominen
17ff002bc0
Sema: improve safety panic for access of inactive union field
2022-11-29 21:44:08 +02:00
Veikka Tuominen
6337c04244
Sema: improve panic for slice start index being greater than end index
...
Closes #13689
2022-11-29 15:47:02 +02:00
Veikka Tuominen
304e828088
Merge pull request #13637 from Vexu/stage2-fixes
...
Stage2 bug fixes
2022-11-26 22:03:49 +02:00
Veikka Tuominen
fe38898246
Sema: pass c_import_buf to child block in more places
...
Closes #13651
2022-11-26 18:05:27 +02:00
Veikka Tuominen
587ef60a28
Sema: resolve union fields before using getTagType
...
Closes #13649
2022-11-26 18:05:27 +02:00
Veikka Tuominen
bf62cb453b
Sema: handle anytype parameter requiring comptime
...
Closes #13645
2022-11-26 18:05:27 +02:00
Veikka Tuominen
9f055e2eb0
Sema: improve compile error for tuple coercion mismatch
2022-11-23 22:16:31 +02:00
Veikka Tuominen
8eea73fb92
add tests for tuple declarations
2022-11-23 22:16:31 +02:00
Veikka Tuominen
9e276d32f3
Sema: fix memory management of missing field error
...
Closes #13590
2022-11-20 20:25:12 +02:00
Veikka Tuominen
835a1f7f0c
Sema: fix missing error on mismatched array init count
...
Closes #13582
2022-11-20 20:25:12 +02:00
Veikka Tuominen
034507ef7c
Module: fix compile error for non-comptime-known global initializer
2022-11-20 20:25:12 +02:00
Veikka Tuominen
bc76873827
Sema: fix type check in zirIntToPtr
...
Simple fix: don't assume a ptr type before it has been checked.
Closes #13567
2022-11-20 20:25:11 +02:00
mparadinha
c4f7663c92
Fix error reporting the wrong line for struct field inits ( #13502 )
...
* point to init part of field delc when that's where the error occurs
* update test to reflect fixed error message
* only lookup source location in case of error
2022-11-15 15:17:23 +02:00
Veikka Tuominen
0a188190b3
AstGen: make pointless discard error more strict
...
The error should only happen as a result of `_ = <expr>` not
for an operand of a break expression that is discarded.
Closes #13212
2022-11-11 17:59:53 +02:00
Veikka Tuominen
89e8bb409a
AstGen: use condbr_inline
if force_comptime is set
...
The `finishThenElseBlock` would correctly use `break_inline`
which would cause Sema to use `addRuntimeBreak` instead of
doing the branch at comptime.
2022-11-11 17:59:53 +02:00
Veikka Tuominen
dc128f403b
Merge pull request #13446 from Vexu/stage2-fixes
...
Stage2 bug fixes
2022-11-07 14:17:26 +02:00
Veikka Tuominen
ea48f06fc2
stage2: address of threadlocal variable is not comptime known
...
Closes #13215
2022-11-05 13:22:21 +02:00
Veikka Tuominen
f92e7bed7b
stage2: bitsize of packed struct should trigger backing int ty check
...
Closes #13398
2022-11-05 12:54:38 +02:00
Andrew Kelley
1d68045919
Merge pull request #13101 from alichraghi/o4
2022-11-05 02:34:24 -04:00
Veikka Tuominen
e6b3cb5043
Sema: detect division overflow
...
Closes #13434
2022-11-04 23:13:29 +02:00
Veikka Tuominen
8c4faa5f3f
Merge pull request #13338 from Vexu/stage2-compile-errors
...
Improve some error messages
2022-11-04 16:04:31 +02:00
Ali Chraghi
f5f1f8c666
all: rename i386 to x86
2022-11-04 00:09:27 +03:30
Andrew Kelley
5f5a20ebaf
Merge pull request #13093 from jacobly0/backend-fixes
...
C backend fixes
2022-10-29 23:06:59 -04:00
Andrew Kelley
28dc208f65
Merge pull request #13082 from g-w1/unnamed-decls-and-relocs-p9
...
Plan9: Fix The Backend
2022-10-29 17:45:00 -04:00
Veikka Tuominen
d7314555f2
Sema: improve compile error for casting double pointer to anyopaque pointer
...
Closes #12042
2022-10-29 14:55:43 +03:00
Veikka Tuominen
61f5ea4c9a
Sema: add error note for wrong pointer dereference syntax
...
Closes #1897
2022-10-29 14:55:43 +03:00
Jacob Young
48a2783969
cbe: implement optional slice representation change
2022-10-29 05:58:41 -04:00
Veikka Tuominen
c3b85e4e2f
Sema: further enhance explanation of why expr is evaluated at comptime
2022-10-28 13:31:16 +03:00
Andrew Kelley
c389f8800b
Merge pull request #13290 from Vexu/generic-deletion-mitigation
...
Mitigate generic deletion bug
2022-10-28 01:04:00 -04:00
Andrew Kelley
2991e4a454
Merge pull request #13288 from Vexu/opt-slice
...
Optimize size of optional slices (+ some fixes)
2022-10-27 22:09:17 -04:00
InKryption
bc72ae5e4e
Sema: Prevent coercion from tuple pointer to mutable slice.
...
Also fix some stdlib code affected by this.
Co-authored by: topolarity <topolarity@tapscott.me>
2022-10-27 22:00:47 -04:00
Veikka Tuominen
648d34d8ea
Sema: coerce zero-bit generic args are coerced properly
...
Closes #13307
2022-10-27 13:40:20 +03:00
Veikka Tuominen
d9fe5ba7f8
Sema: add error for too big packed struct
2022-10-27 01:31:18 +03:00
Veikka Tuominen
b12a5cea75
remove test case triggering generic deletion bug
...
This test should be restored once the underlying issue is resolved (with the typo fixed).
2022-10-27 01:31:05 +03:00
Jacob Young
15df64ade8
std: add cbe hacks to more targets
...
These are needed because clang doesn't support anything in naked
functions, not even assembly register inputs.
2022-10-25 05:11:29 -04:00
Jacob G-W
5aef54cbc8
additional fixes for Plan9
...
with this, the tests should pass
2022-10-24 17:01:26 -04:00
Jacob G-W
c6fb798740
Revert "remove plan9 test coverage": Plan9 now works :^)
...
This reverts commit 67db2b85b7
.
2022-10-24 16:53:12 -04:00
Veikka Tuominen
07b6173cb8
delete failing recursive test
...
Don't forget to add these back when solving #12973
2022-10-20 20:11:12 +03:00