aboutsummaryrefslogtreecommitdiff
path: root/test/compile_errors.zig
AgeCommit message (Collapse)Author
2021-01-11Merge pull request #7200 from Vexu/arrAndrew Kelley
Type coercion for pointers to anon literals
2020-12-28stage1: Prevent crash with some lazy pointer typesLemonBoy
Make sure the child element is not undefined, let's catch this problem early on. Closes #7568
2020-12-25stage1: validate pointer attributes when coercing anon literalsVexu
2020-12-21stage1: add missing error check on inferred struct field ptrVexu
2020-12-08stage1: Validate the specified cc for lazy fn typesLemonBoy
Closes #7337
2020-12-03stage1: compile error for pointer arithmetic on ptr-to-arrayAndrew Kelley
See #2018
2020-11-19Merge pull request #6829 from tadeokondrak/error-unsupported-callconvVeikka Tuominen
stage1: Compile error instead of falling back to C for unsupported cc
2020-11-19Add builtin.Signedness, use it instead of is_signedTadeo Kondrak
2020-11-19add compile-error tests for unsupported calling conventionVexu
2020-11-18stage1: improve error for missing a number type on a runtime varpfg
2020-11-18Change error when runtime value passed to comptime argfrmdstryr
2020-11-18stage1: Reject undefined values when taking union ptrLemonBoy
The code rightfully assumes the union_val object to be fully initialized. Closes #7019
2020-11-11ensure TypeInfo payload is not undefinedVexu
2020-11-05stage1: Make sure union(enum(T)) is validLemonBoy
The T type should be wide enough to fit values in the 0...num field range. Closes #6988
2020-10-30remove extra space in .** error messageTravis
2020-10-30Merge pull request #6858 from travv0/no-star-after-dot-starVeikka Tuominen
don't allow a token starting with an asterisk directly following .*
2020-10-29stage1: Error out when trying to execute `unreachable`LemonBoy
Closes #6802
2020-10-29updated zig tokenizer to handle .*** and added testsTravis
2020-10-22Merge pull request #6744 from LemonBoy/intcast-vecAndrew Kelley
stage1: Implement `@intCast` between vectors
2020-10-19stage1: Implement `@intCast` between vectorsLemonBoy
Explicit and implicit integer casts on vector types are now supported and follow the same rules as their scalar counterparts. Implicit float casts are accidentally supported, `@floatCast` is still not vector-aware.
2020-10-17stage1: Fix type-checking of unary neg for vector typesLemonBoy
Validate the vector element type as done for the scalar case. Fixes #6708
2020-10-16stage1: Expand undefined struct/arrays when indexedLemonBoy
Fixes #6693
2020-10-08stage1: Disallow arrays in function parameters or return typesTadeo Kondrak
Closes #6535.
2020-10-07Merge pull request #6421 from tadeokondrak/opaque-syntaxAndrew Kelley
Add opaque syntax that allows declarations
2020-10-07stage1: improve error messages for missing `try` statementspfg
2020-10-06Update compile error test for field access of opaque typeTadeo Kondrak
2020-10-06stage1: disallow fields in opaque typesTadeo Kondrak
2020-10-06Update zig files for opaque type syntaxTadeo Kondrak
2020-10-03Merge pull request #6427 from ↵Alexandros Naskos
tadeokondrak/enums-explicit-tag-type-extern-allowed Allow enums with explicit extern-allowed tag types in extern types
2020-10-01Add test for implicit extern-allowed enum tag type in extern structTadeo Kondrak
2020-10-01Add tests for enums with explicit extern-allowed tag types in extern typesTadeo Kondrak
2020-10-01stage1: Implement @Type for Fn and BoundFnTadeo Kondrak
2020-10-01Update compile error tests for alignment in StructField/UnionFieldTadeo Kondrak
2020-09-30stage1: Fix @Type(.Enum) with invalid tag_typeTadeo Kondrak
Fixes https://github.com/ziglang/zig/issues/6459
2020-09-29Merge remote-tracking branch 'origin/master' into stage2-zig-ccAndrew Kelley
2020-09-28stage1: Detect OOB access of vector valueLemonBoy
Fixes #5710
2020-09-26fix another round of regressions in this branchAndrew Kelley
* std.log: still print error messages in ReleaseSmall builds. - when start code gets an error code from main, it uses std.log.err to report the error. this resulted in a test failure because ReleaseSmall wasn't printing `error: TheErrorCode` when an error was returned from main. But that seems like it should keep working. So I changed the std.log defaults. I plan to follow this up with a proposal to change the names of and reduce the quantity of the log levels. * warning emitted when using -femit-h when using stage1 backend; fatal log message when using -femit-h with self-hosted backend (because the feature is not yet available) * fix double `test-cli` build steps in zig's build.zig * update docgen to use new CLI * translate-c uses `-x c` and generates a temporary basename with a `.h` extension. Otherwise clang reports an error. * --show-builtin implies -fno-emit-bin * restore the compile error for using an extern "c" function without putting -lc on the build line. we have to know about the libc dependency up front. * Fix ReleaseFast and ReleaseSmall getting swapped when passing the value to the stage1 backend. * correct the zig0 CLI usage text. * update test harness code to the new CLI.
2020-09-07@Type for union fixesTadeo Kondrak
2020-09-07Implement @Type for UnionTadeo Kondrak
This removes TypeInfo.UnionField.enum_field, which is redundant with TypeInfo.Union.tag_type.
2020-09-05Merge pull request #6246 from Vexu/fieldVeikka Tuominen
Remove deprecated fields on `type`
2020-09-04update rest of testsVexu
2020-09-04langref: atomic ops are allowed on pointersVexu
Closes #6217
2020-09-01ir: Typecheck the sentinel value in *[N:S1]T to [S2]T castsLemonBoy
Closes #6054
2020-08-30Remove @OpaqueTypeTadeo Kondrak
2020-08-24fix error note using invalid source nodeVexu
Closes #6153
2020-08-24add error checks to `@Type`Vexu
2020-08-21Update compile-errors test for @Type(.Enum) changesTadeo Kondrak
2020-08-21Implement @Type for EnumTadeo Kondrak
2020-08-20Merge pull request #6103 from Vexu/externAndrew Kelley
Disallow extern variables with initializers.
2020-08-20disallow extern variables with initializersVexu