# make \`@alignOf\` lazily evaluate the target type · gitcafe/zig

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

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

Visibility: public

Requested revision: ede0c22a6796600cfc4555e9ac2f0481c41c290a

Requested commit: ede0c22a6796600cfc4555e9ac2f0481c41c290a

Commit: ede0c22a6796600cfc4555e9ac2f0481c41c290a

Tree: 6d565af62f39457688c3fa059e7a67d6b73c6cac

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

````
make `@alignOf` lazily evaluate the target type

this case works now:

```zig
const Foo = struct {
    field: Bar(@alignOf(*Foo)),
};
fn Bar(comptime alignment: u29) type {
    return struct {
        field: *align(alignment) Foo,
    };
}
```

````

## Parents

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

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