# stage2: improve \`@typeName\` · gitcafe/zig

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

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

Visibility: public

Requested revision: f3f5a5d05b7056aceb408b701613242d053019ab

Requested commit: f3f5a5d05b7056aceb408b701613242d053019ab

Commit: f3f5a5d05b7056aceb408b701613242d053019ab

Tree: acb912950d734b0c25b38c1ae82a8558d1313057

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: improve `@typeName`

 * make it always return a fully qualified name. stage1 is inconsistent
   about this.
 * AstGen: fix anon_name_strategy to correctly be `func` when anon type
   creation happens in the operand of the return expression.
 * Sema: implement type names for the "function" naming strategy.
 * Put "enum", "union", "opaque", or "struct" in place of "anon" when
   creating respective anonymous Decl names.
 * std.testing: add `expectStringStartsWith`. Didn't end up using it
   after all.

Also this enables the real test runner for stage2 LLVM backend (sans
wasm32) since it works now.

```

## Parents

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

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