# Sema: respect requiresComptime of function return types · gitcafe/zig

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

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

Visibility: public

Requested revision: 7e9b23e6dce4d87615acd635f3731731a8601d39

Requested commit: 7e9b23e6dce4d87615acd635f3731731a8601d39

Commit: 7e9b23e6dce4d87615acd635f3731731a8601d39

Tree: 392b32ff570328a8fcd984013ad844b063beaa77

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
Sema: respect requiresComptime of function return types

When doing a function call, if the return type requires comptime, the
function is analyzed as an inline/comptime call.

There is an important TODO here. I will reproduce the comment from this
commit:

> In the case of a comptime/inline function call of a generic function,
> the function return type needs to be the resolved return type based on
> the function parameter type expressions being evaluated with comptime arguments
> passed in. Otherwise, it ends up being .generic_poison and failing the
> comptime/inline function call analysis.

```

## Parents

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

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