No typechecker or runtime error when trying to append to a const collection
Open
- Dominant language
- C++
- Stars
- 18.7k
- Forks
- 3.1k
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 2
Description
### HHVM Version
```
HipHop VM 3.27.2 (rel)
hh-e6d25982534cd57e1e7fa1e990dcb876c981b957-3.27.2 Wed Aug 15 18:09:53 2018
```
### Operating System and Version
macOS High Sierra
### Standalone code, or other way to reproduce the problem
```
const arr = ['a'];
arr[] = 'b';
var_dump(arr);
```
### Actual result
Output:
```
array(1) {
[0]=>
string(1) "a"
}
```
with no errors. Same behavior when called from inside a function.
### Expected result
Should raise a typechecker error and a runtime fatal.
Contributor guide
Assessment
This issue has not been assessed yet.