aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/bugs/1500.zig
AgeCommit message (Collapse)Author
2024-01-06categorize `behavior/bugs/<issueno>.zig` testsVeikka Tuominen
2023-11-19test: update behavior to silence 'var is never mutated' errorsmlugg
2023-09-23spirv: enable passing testsRobin Voetter
2023-05-11setup spirv backend in behavior testsAli Chraghi
2022-10-25cbe: fix infinite recursion on recursive typesJacob Young
2022-02-08stage2: tiny improvements all over the placeJakub Konka
* pass more x64 behavior tests * return with a TODO error when lowering a decl with no runtime bits * insert some debug logs for tracing recursive descent down the type-value tree when lowering types * print `Decl`'s name when print debugging `decl_ref` value
2022-02-06stage2 ARM: enable a handful of passing behavior testsjoachimschmidt557
2022-01-25wasm: Implement genTypedValue for enumsLuuk de Gram
This makes all union test cases succeed. `rem` was also implemented as all we had to do is enable the instruction. Loading and storing values based on ABI-size was simplified to a direct abiSize() call. We also enabled all the newly passing test cases and disable them for all non-passing backends. All of those test cases were verified to see if they perhaps already pass for the c-backend.
2022-01-24stage2: type system treats fn ptr and body separatelyAndrew Kelley
This commit updates stage2 to enforce the property that the syntax `fn()void` is a function *body* not a *pointer*. To get a pointer, the syntax `*const fn()void` is required. ZIR puts function alignment into the func instruction rather than the decl because this way it makes it into function types. LLVM backend respects function alignments. Struct and Union have methods `fieldSrcLoc` to help look up source locations of their fields. These trigger full loading, tokenization, and parsing of source files, so should only be called once it is confirmed that an error message needs to be printed. There are some nice new error hints for explaining why a type is required to be comptime, particularly for structs that contain function body types. `Type.requiresComptime` is now moved into Sema because it can fail and might need to trigger field type resolution. Comptime pointer loading takes into account types that do not have a well-defined memory layout and does not try to compute a byte offset for them. `fn()void` syntax no longer secretly makes a pointer. You get a function body type, which requires comptime. However a pointer to a function body can be runtime known (obviously). Compile errors that report "expected pointer, found ..." are factored out into convenience functions `checkPtrOperand` and `checkPtrType` and have a note about function pointers. Implemented `Value.hash` for functions, enum literals, and undefined values. stage1 is not updated to this (yet?), so some workarounds and disabled tests are needed to keep everything working. Should we update stage1 to these new type semantics? Yes probably because I don't want to add too much conditional compilation logic in the std lib for the different backends.
2021-06-21std, src, doc, test: remove unused variablesJacob G-W
2021-04-29move behavior tests from test/stage1/ to test/Andrew Kelley
And fix test cases to make them pass. This is in preparation for starting to pass behavior tests with self-hosted.