aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors
AgeCommit message (Collapse)Author
2022-08-18Merge pull request #12462 from Vexu/stage2-noreturnVeikka Tuominen
Stage2: improve behavior of noreturn
2022-08-17fix typo in compile error messageAndrew Kelley
2022-08-17add testVeikka Tuominen
2022-08-17Sema: allow empty enums and unionsVeikka Tuominen
2022-08-17Sema: properly handle noreturn fields in unionsVeikka Tuominen
2022-08-17Sema: make noreturn error union behave correctlyVeikka Tuominen
2022-08-17Sema: make optional noreturn behave correctlyVeikka Tuominen
2022-08-16AstGen: detect declarations shadowing localsVeikka Tuominen
Closes #9355
2022-08-15stage2: add compile errors for comptime `@shrExact` and `@divExact` failuresLeRoyce Pearson
2022-08-12Sema: add error for signed integer divisionmartinhath
stage1 error reads error: division with 'i32' and 'comptime_int': signed integers must use @divTrunc, @divFloor, or @divExact Fixes: #12339
2022-08-10Merge pull request #12379 from ifreund/packed-struct-explicit-backing-intAndrew Kelley
stage2: Implement explicit backing integers for packed structs
2022-08-10stage2: add compile error for invalid null/undefined pointer castInKryption
2022-08-10stage2: add compile error for shlExact overflowLeRoyce Pearson
- moves a stage1 test case and makes it target `llvm` backend instead of `stage1` backend
2022-08-10stage2: Implement explicit backing integers for packed structsIsaac Freund
Now the backing integer of a packed struct type may be explicitly specified with e.g. `packed struct(u32) { ... }`.
2022-08-09Sema: add declared here note to function call errorsVeikka Tuominen
2022-08-09stage2: generate call arguments in separate blocksVeikka Tuominen
2022-08-09stage2: correct node offset of nested declarationsVeikka Tuominen
2022-08-08stage2: pass anon name strategy to reifyVeikka Tuominen
2022-08-07remove brittle test caseAndrew Kelley
see #12358
2022-08-06Sema: fix infinite recursion in `explainWhyTypeIsComptime`Anton Lilja
Co-authored-by: Veikka Tuominen <git@vexu.eu>
2022-08-03Sema: add error for dependency loopsVeikka Tuominen
2022-08-03AstGen: better source location for if/while condition unwrappingVeikka Tuominen
2022-08-03AstGen: check loop bodies and else branches for unused resultVeikka Tuominen
2022-08-03Sema: improve circular dependency errorsVeikka Tuominen
2022-08-03AstGen: add error for break/continue out of defer expressionVeikka Tuominen
2022-08-03Sema: add error for closure capture at runtimeVeikka Tuominen
2022-08-02Sema: add safety for sentinel sliceVeikka Tuominen
2022-08-01Sema: validate packed struct field typesVeikka Tuominen
2022-08-01stage2: better source location for var declsVeikka Tuominen
2022-08-01Sema: validate bitcast operand typeVeikka Tuominen
2022-07-30Sema: check comptime slice sentinelVeikka Tuominen
2022-07-30Sema: implement coercion from tuples to tuplesVeikka Tuominen
Closes #12242
2022-07-30Sema: implement `@Type` for functionsVeikka Tuominen
Closes #12280
2022-07-29fix compile error test case note column numberAndrew Kelley
2022-07-29stage2: handle tuple init edge casesVeikka Tuominen
2022-07-29stage2: add error for comptime control flow in runtime blockVeikka Tuominen
2022-07-26test-cases: remove failing testAndrew Kelley
This causes a stack overflow in a debug build of stage3 unfortunately. I will open an issue to track this test coverage, which we absolutely should get working - users of the compiler should get a compile error, not a segfault if they hit the default branch quota from abusing recursive inline functions. Note that the problem does not occur in a release build of stage3 which has significantly reduced stack usage. On Linux, I tried bumping up the stack size from 32 MiB to 64 MiB and it did not solve the problem. I'm not sure why not. It seems like it should be fine. Note that we also have a problem of running test-cases in multi-threaded mode which is currently the default. Currently Zig threads are spawned with 16 MiB stack space.
2022-07-26Merge pull request #12244 from Vexu/stage2Andrew Kelley
Minor stage2 fixes
2022-07-26Sema: better error when coercing error setsVeikka Tuominen
2022-07-26Sema: improve expression value ignored errorVeikka Tuominen
Closes #4483
2022-07-26Sema: resolve lazy values for compile logVeikka Tuominen
Close #12204
2022-07-26Sema: give comptime_field_ptr priority over field_ptr in tuplesVeikka Tuominen
Closes #11983
2022-07-26AstGen: disable null bytes and empty stings in some placesVeikka Tuominen
Namely: * test names * identifiers * library names * import strings
2022-07-26Sema: better source location for builtin optionsVeikka Tuominen
2022-07-26Module: improve handling of errors in `@call` argumentsVeikka Tuominen
2022-07-24stage2: implement `noinline fn`Meghan
2022-07-24report better error for package not found in stage2Andreas Reischuck
2022-07-23Sema: validate duplicate fields in anon structsVeikka Tuominen
2022-07-23Sema: add some more 'declared here' notesVeikka Tuominen
2022-07-23AstGen: make comptime fields in packed and extern structs compile errorsVeikka Tuominen