aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors
AgeCommit message (Collapse)Author
2022-11-20Sema: fix memory management of missing field errorVeikka Tuominen
Closes #13590
2022-11-20Sema: fix missing error on mismatched array init countVeikka Tuominen
Closes #13582
2022-11-20Module: fix compile error for non-comptime-known global initializerVeikka Tuominen
2022-11-20Sema: fix type check in `zirIntToPtr`Veikka Tuominen
Simple fix: don't assume a ptr type before it has been checked. Closes #13567
2022-11-15Fix error reporting the wrong line for struct field inits (#13502)mparadinha
* 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-11AstGen: make pointless discard error more strictVeikka Tuominen
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-11AstGen: use `condbr_inline` if force_comptime is setVeikka Tuominen
The `finishThenElseBlock` would correctly use `break_inline` which would cause Sema to use `addRuntimeBreak` instead of doing the branch at comptime.
2022-11-07Merge pull request #13446 from Vexu/stage2-fixesVeikka Tuominen
Stage2 bug fixes
2022-11-05stage2: address of threadlocal variable is not comptime knownVeikka Tuominen
Closes #13215
2022-11-05stage2: bitsize of packed struct should trigger backing int ty checkVeikka Tuominen
Closes #13398
2022-11-05Merge pull request #13101 from alichraghi/o4Andrew Kelley
2022-11-04Sema: detect division overflowVeikka Tuominen
Closes #13434
2022-11-04all: rename i386 to x86Ali Chraghi
2022-10-29Sema: improve compile error for casting double pointer to anyopaque pointerVeikka Tuominen
Closes #12042
2022-10-29Sema: add error note for wrong pointer dereference syntaxVeikka Tuominen
Closes #1897
2022-10-28Sema: further enhance explanation of why expr is evaluated at comptimeVeikka Tuominen
2022-10-28Merge pull request #13290 from Vexu/generic-deletion-mitigationAndrew Kelley
Mitigate generic deletion bug
2022-10-27Merge pull request #13288 from Vexu/opt-sliceAndrew Kelley
Optimize size of optional slices (+ some fixes)
2022-10-27Sema: Prevent coercion from tuple pointer to mutable slice.InKryption
Also fix some stdlib code affected by this. Co-authored by: topolarity <topolarity@tapscott.me>
2022-10-27Sema: coerce zero-bit generic args are coerced properlyVeikka Tuominen
Closes #13307
2022-10-27Sema: add error for too big packed structVeikka Tuominen
2022-10-27remove test case triggering generic deletion bugVeikka Tuominen
This test should be restored once the underlying issue is resolved (with the typo fixed).
2022-10-20stage2: improve source location of assignmentVeikka Tuominen
2022-10-20Sema: allow runtime only instructions to be emitted in outside functionsVeikka Tuominen
It is possible to get comptime-known values from runtime-known values for example the length of array. Allowing runtime only instructions to be emitted outside function bodies allows these operations to happen. In places where comptime-known values are required we have other methods to ensure that and they usually result in more specific compile errors too. Closes #12240
2022-10-12fix hyphenation in test caseVeikka Tuominen
Follow up to 51d9db856978610c24b3fed50a9550455a2eb64b
2022-10-12Merge pull request #13081 from r00ster91/docsAndrew Kelley
fix(text): hyphenation and other fixes
2022-10-10Merge pull request #13075 from Vexu/stage2-fixesVeikka Tuominen
Stage2 misc fixes
2022-10-08Sema: add error for capturing a runtime value outside of function scopeVeikka Tuominen
Closes #13104
2022-10-08Sema: restore sema.src after inline callVeikka Tuominen
Closes #13099
2022-10-07Sema: allow equality comparisons between error unions and error setsVeikka Tuominen
Closes #1302
2022-10-07AstGen: use 'shadows' instead of 'redeclaration' when names are in different ↵Veikka Tuominen
scopes Closes #8532
2022-10-06Sema: fix error location when casting pointer to sliceAli Chraghi
Co-authored-by: Veikka Tuominen <git@vexu.eu>
2022-10-06Sema: disallow using stage1 fn ptrs in extern contextsVeikka Tuominen
Closes #13022
2022-10-06Sema: generic function instantiation inherits parent's branch quotaVeikka Tuominen
Closes #12624
2022-10-06Sema: disallow fieldParentPtr and offsetOf on comptime fieldsVeikka Tuominen
Comptime fields are tied to the type and behave more like declarations so these operations cannot return anything useful for them.
2022-10-06stage2: add error for non-void error union payload being ignoredVeikka Tuominen
See https://github.com/ziglang/zig/pull/6060#discussion_r471032912
2022-10-05fix(text): hyphenate "runtime" adjectivesr00ster91
2022-10-05fix(text): hyphenate "comptime" adjectivesr00ster91
2022-10-05fix(text): hyphenation and other fixesr00ster91
2022-10-05Sema: avoid passing undefined as reason to `failWithNeededComptime`Veikka Tuominen
Closes #13046
2022-10-03Merge pull request #12979 from Vexu/inline-switchAndrew Kelley
Implement inline switch cases
2022-10-03Sema: fix function paramater count mismatch noteJacob Young
expected type 'fn() void', found 'fn(i32) void' function with 0 parameters cannot cast into a function with 0 parameters => expected type 'fn() void', found 'fn(i32) void' function with 1 parameters cannot cast into a function with 0 parameters
2022-10-03Sema: require reified packed struct fields to have zero alignmentJulian
2022-09-30stage2: improve error message for missing member in file root structVeikka Tuominen
* the root struct decl name is fully qualified this prevents error messages containing 'main.main' * avoid declared here note when file struct is missing a member It always points at the start of the file which might contain another container misleading the user.
2022-09-29Sema: improve source location in errorsIgor Anić
resolves #12793
2022-09-28stage2: detect duplicate enum valuesJacob G-W
Closes #12805
2022-09-27Sema: check that reified enum field values fits tag type.InKryption
2022-09-27Sema: implement `inline else` for errors enums and boolsVeikka Tuominen
2022-09-27add inline switch union tag capturesVeikka Tuominen
2022-09-27AstGen: analyze inline switch casesVeikka Tuominen