# stage2: rework Type Payload layout · gitcafe/zig

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

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

Visibility: public

Requested revision: 133da8692e80532797dd91b32539cf2175280a95

Requested commit: 133da8692e80532797dd91b32539cf2175280a95

Commit: 133da8692e80532797dd91b32539cf2175280a95

Tree: 8ff37b28c783d14be6aa459673202909de47b1ec

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: rework Type Payload layout

Add `Type.castTag` and note that it is preferable to call than
`Type.cast`. This matches other abstractions in the codebase.

Added a convenience function `Type.Tag.create` which really cleans up
the callsites of creating `Type` objects.

`Type` payloads can now share types. This is in preparation for another
improvement that I want to do.

```

## Parents

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

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