# stage2: fix some generics issues · gitcafe/zig

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

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

Visibility: public

Requested revision: 2af69710a7b1513f3540ae0e1178cb5f3948204d

Requested commit: 2af69710a7b1513f3540ae0e1178cb5f3948204d

Commit: 2af69710a7b1513f3540ae0e1178cb5f3948204d

Tree: 9f8aa5fd7d80ec976a5355348e7b3a6347caf1b5

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: fix some generics issues

 * std.meta: correct use of `default_value` in reification. stage1
   accepted a wrong type for `null`.
 * Sema: after instantiating a generic function, if the return type ends
   up being a comptime-known type, then we return an error, undoing the
   generic function instantiation, and making a comptime function call
   instead.
   - We also needed to clean up the dependency graph in this case.
 * Sema: reified enums set tag_ty_inferred to false since an integer tag
   type is provided. This is a limitation of the `@Type` builtin which
   will be addressed with #10710.
 * Sema: fix resolveInferredErrorSet incorrectly calling
   ensureFuncBodyAnalyzed on generic functions.

```

## Parents

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

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