diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-01-18 18:10:15 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-01-18 18:22:48 -0700 |
| commit | 8375b71f75c8b8567bc7d97867716c4911dace65 (patch) | |
| tree | af72f900f284ea8bb99e975472113baee793773c /test/behavior.zig | |
| parent | cd594d10bdb930afe0cd05f1fcc8a7ecf2af4554 (diff) | |
| download | zig-8375b71f75c8b8567bc7d97867716c4911dace65.tar.gz zig-8375b71f75c8b8567bc7d97867716c4911dace65.zip | |
Sema: implement declarations for `@typeInfo`
In the behavior test listings, I had to move type_info.zig test import
to a section that did not include the x86 backend because it got to the
point where adding another test to the file, even if it was an empty
test that just returned immediately, caused a runtime failure when
executing the test binary.
Anyway, type info for opaques is implemented, and the declarations slice
is shared between it, enums, and unions.
Still TODO is the `data` field of a `Declaration`. I want to consider
removing it from the data returned from `@typeInfo` and introducing
`@declInfo` or similar for this data. This would avoid the complexity of
a lazy mechanism.
Diffstat (limited to 'test/behavior.zig')
| -rw-r--r-- | test/behavior.zig | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/behavior.zig b/test/behavior.zig index cd569a9af9..51c6aa9a18 100644 --- a/test/behavior.zig +++ b/test/behavior.zig @@ -11,7 +11,6 @@ test { _ = @import("behavior/hasdecl.zig"); _ = @import("behavior/hasfield.zig"); _ = @import("behavior/pub_enum.zig"); - _ = @import("behavior/type_info.zig"); _ = @import("behavior/type.zig"); _ = @import("behavior/bugs/655.zig"); _ = @import("behavior/bool.zig"); @@ -56,6 +55,7 @@ test { _ = @import("behavior/this.zig"); _ = @import("behavior/truncate.zig"); _ = @import("behavior/try.zig"); + _ = @import("behavior/type_info.zig"); _ = @import("behavior/undefined.zig"); _ = @import("behavior/underscore.zig"); _ = @import("behavior/usingnamespace.zig"); @@ -194,7 +194,6 @@ test { _ = @import("behavior/truncate_stage1.zig"); _ = @import("behavior/tuple.zig"); _ = @import("behavior/type_stage1.zig"); - _ = @import("behavior/type_info_stage1.zig"); _ = @import("behavior/typename.zig"); _ = @import("behavior/union_stage1.zig"); _ = @import("behavior/union_with_members.zig"); |
