# fix assert on self-referencing function ptr field · gitcafe/zig

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

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

Visibility: public

Requested revision: 90598b4631e3b68565c7d62102a9e4615514a721

Requested commit: 90598b4631e3b68565c7d62102a9e4615514a721

Commit: 90598b4631e3b68565c7d62102a9e4615514a721

Tree: 01a2416c8fe22ee34b07e8e2feb3a32af799ed9a

Author: Ben Noordhuis

Committer: Ben Noordhuis

## Message

```
fix assert on self-referencing function ptr field

The construct `struct S { f: fn(S) void }` is not legal because structs
are not copyable but it should not result in an ICE.

Fixes #795.

```

## Parents

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

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