# stage2: don't call comptime functions with generic poison arguments · gitcafe/zig

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

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

Visibility: public

Requested revision: 41e52bd5ccaccc0191c9f3434098d27ed07f62b7

Requested commit: 41e52bd5ccaccc0191c9f3434098d27ed07f62b7

Commit: 41e52bd5ccaccc0191c9f3434098d27ed07f62b7

Tree: fccb23581898f838afadab135beaf93219cae754

Author: Robin Voetter

Committer: Robin Voetter

## Message

```
stage2: don't call comptime functions with generic poison arguments

When calling a comptime or inline function, if the parameter is generic and
is resolved to generic_poison or generic_poison_type, the invocation was
part of another function's parameters or return type expression and is
dependent on an as-of-yet type of another parameter. In this case, processing
should stop, and we return error.GenericPoison to let the caller in funcCommon,
zirParam or zirParamAnytype know that the function is generic.

```

## Parents

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

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