facebook / facebook/hhvm

Hack does not refine variables of unknown type when using the `as` operator

Open
#8,472 2 comments 0 reactions 0 assignees View on GitHub
hack
Dominant language
C++
Stars
18.7k
Forks
3.1k
Avg merge
1h 47m
Merged PRs (30d)
2

Description

### HHVM Version

3.30.3 + 4.0 + 2019.03.20

### Operating System and Version

macOS Mojave

### Standalone code, or other way to reproduce the problem

Hack does not refine variables of unknown type when using the `as` operator. It works as expected at runtime, but the typechecker seems to just ignore it.

```PHP

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.