# Sema: implement declarations for \`@typeInfo\` · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/8375b71f75c8b8567bc7d97867716c4911dace65)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 8375b71f75c8b8567bc7d97867716c4911dace65

Requested commit: 8375b71f75c8b8567bc7d97867716c4911dace65

Commit: 8375b71f75c8b8567bc7d97867716c4911dace65

Tree: af72f900f284ea8bb99e975472113baee793773c

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
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.

```

## Parents

- [cd594d10bdb930afe0cd05f1fcc8a7ecf2af4554](https://git.cafe/gitcafe/zig/commit/cd594d10bdb930afe0cd05f1fcc8a7ecf2af4554?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/8375b71f75c8b8567bc7d97867716c4911dace65?format=markdown)
