Commit Graph

19 Commits

Author SHA1 Message Date
Andrew Kelley 4751356d7f clean up some behavior tests
* improve names
 * properly categorize a couple of bug cases
 * mark one as already passing
2022-05-26 21:58:19 -07:00
Jakub Konka 4ef26fc355 pass more behaviour tests 2022-03-24 17:04:50 +01:00
Luuk de Gram 2fc91a09a2 wasm: Enable passing tests
This enables the tests that now pass due to the changes to lower
parent pointers are lowered, as well as the additional features to unions.
2022-03-19 20:56:04 +01:00
Daniele Cocca 6fdca525de CBE: add support for tuples
Also promote tests that are now passing.
2022-03-18 16:50:34 +00:00
Daniele Cocca af8586da3a tuple: replace expectEqual() with expect() 2022-03-18 11:18:12 +00:00
Andrew Kelley 5ea94e7715 stage2: rework Value storage of structs and arrays
Now they both use `Value.Tag.aggregate`.

Additionally the LLVM backend now has implemented lowering of
tuple values.
2022-03-14 12:28:52 -07:00
Andrew Kelley 273da9efd9 AstGen: structInitExpr and arrayInitExpr avoid crash
when an inferred alloc is passed as the result pointer of a block.
2022-03-10 17:52:18 -07:00
Andrew Kelley a30d283981 AstGen: lower anon struct inits differently
This is a companion commit to f2a5d0bf94.
What that one did for tuples, this one does for anonymous structs.
2022-03-10 17:52:18 -07:00
Andrew Kelley f32a77b30d Sema: implement pointer-to-tuple coercion to slice and struct 2022-03-09 17:33:01 -07:00
Andrew Kelley 83bb3d1ad6 Sema: fix generic fn instantiation with anytype
When the anytype parameter had only one-possible-value
(e.g. `void`), it would create a mismatch in the function type and the
function call. Now the function type and the callsite both omit the
one-possible-value anytype parameter in instantiated generic functions.
2022-03-09 15:35:13 -07:00
Andrew Kelley 0f0d27ce24 Sema: implement tuple fieldptr and fieldval 2022-03-09 01:19:29 -07:00
Jonathan Marler d805adddd6 deprecated TypeInfo in favor of Type
Co-authored-by: Veikka Tuominen <git@vexu.eu>
2022-03-08 20:38:12 +02:00
Andrew Kelley 8878f085dc Sema: correct implementation of comptimeOnly for tuples
This makes formatted printing work when mixing comptime and runtime
fields.
2022-03-01 15:26:31 -07:00
Veikka Tuominen dfeffcfbf8 stage2: tuple mul/cat 2022-02-28 13:09:14 -07:00
Andrew Kelley 0b7347fd18 move more behavior tests to the "passing" section 2022-02-12 21:35:29 -07:00
Jacob G-W 641ecc260f std, src, doc, test: remove unused variables 2021-06-21 17:03:03 -07:00
LemonBoy fc8791c133 stage1: Allow array-like initialization for tuple types
This small change makes working with tuple types much easier, allowing
the use of anonymous (eg. obtained with meta.ArgsTuple) tuples in more
places without the need for specifying each (quoted!) field name in the
initializer.
2021-06-06 21:21:42 -04:00
Andrew Kelley 5619ce2406 Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen
Conflicts:
 * doc/langref.html.in
 * lib/std/enums.zig
 * lib/std/fmt.zig
 * lib/std/hash/auto_hash.zig
 * lib/std/math.zig
 * lib/std/mem.zig
 * lib/std/meta.zig
 * test/behavior/alignof.zig
 * test/behavior/bitcast.zig
 * test/behavior/bugs/1421.zig
 * test/behavior/cast.zig
 * test/behavior/ptrcast.zig
 * test/behavior/type_info.zig
 * test/behavior/vector.zig

Master branch added `try` to a bunch of testing function calls, and some
lines also had changed how to refer to the native architecture and other
`@import("builtin")` stuff.
2021-05-08 14:45:21 -07:00
Andrew Kelley 4307436b99 move behavior tests from test/stage1/ to test/
And fix test cases to make them pass. This is in preparation for
starting to pass behavior tests with self-hosted.
2021-04-29 15:54:04 -07:00