Errors on accessing indexed properties on object without prototype
- Dominant language
- Rust
- Stars
- 22.3k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
Flow version: `0.105.2`
```js
type ObjMap = { [key: string]: string, __proto__: null };
const a: ObjMap = { toString: 'test', __proto__: null };
a.b
a.toString
a.hasOwnProperty
```
## Expected behavior
It should be possible to access all properties
## Actual behavior
```
5: a.toString
^ Cannot get `a.toString` because property `toString` is missing in `ObjMap` [1].
References:
3: const a: ObjMap = { toString: 'test', __proto__: null };
^ [1]
6: a.hasOwnProperty
^ Cannot get `a.hasOwnProperty` because property `hasOwnProperty` is missing in `ObjMap` [1].
References:
3: const a: ObjMap = { toString: 'test', __proto__: null };
^ [1]
```
* Link to Try-Flow or Github repo:
https://flow.org/try/#0C4TwDgpgBA8gRgKwLIEMxQLxQN5QNoDWEIAXFAM7ABOAlgHYDmAumZbYwDRQD63YVAe2ADeZOgFcANpKgBfANwAoRQGMBdSlBRl4yNJhxRhAZWr0GZAOTAIlS1178hI7mKkyFilADo4X7yZmjP4AFijkMADudAAKgpBUoEA
Contributor guide
Assessment
This issue has not been assessed yet.