# stage2: add compiler test to ensure typed null doesn't coerce to any · gitcafe/zig

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

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

Visibility: public

Requested revision: 7ec2261dbf7a85f5c215f2dac22b80fca7de1e0f

Requested commit: 7ec2261dbf7a85f5c215f2dac22b80fca7de1e0f

Commit: 7ec2261dbf7a85f5c215f2dac22b80fca7de1e0f

Tree: b8faff85307df51c3a91cd6c46ec432ba9e175d0

Author: Mitchell Hashimoto

Committer: Andrew Kelley

## Message

```
stage2: add compiler test to ensure typed null doesn't coerce to any

In stage1, this behavior was allowed (by accident?) and also
accidentally exercised by the behavior test changed in this commit. In
discussion on Discord, Andrew decided this should not be allowed in
stage2 since there is currently on real world reason to allow this
strange edge case.

I've added the compiler test to solidify that this behavior should NOT
occur and updated the behavior test to the new valid semantics.

```

## Parents

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

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