Union speculation error message regression
- Dominant language
- Rust
- Stars
- 22.3k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
Regression in Flow v0.68
Flow version: 0.102.0
## Expected behavior
```
7: foo({
^ Cannot call `foo` with object literal bound to `a` because:
Either string [1] is incompatible with string literal `foo` [2] in property `type`.
Or string [1] is incompatible with string literal `bar` [3] in property `type`.
References:
8: type: "" ^ [1]
3: type A = {| +type: "foo" |} | {| +type: "bar" |}
^ [2]
3: type A = {| +type: "foo" |} | {| +type: "bar" |}
^ [3]
```
## Actual behavior
```
7: foo({
^ Cannot call `foo` with object literal bound to `a` because object literal [1] is incompatible with `A` [2].
References:
7: foo({
^ [1]
5: function foo(a: A) {}
^ [2]
```
* Link to Try-Flow or Github repo: https://flow.org/try/#0PQKgBAAgZgNg9gdzCYAoVAXAngBwKZgCCYAvGAN4A+YA1NvgFxgBEUcczYlAvlxdXVx4mzAEYBDAE6ce6KAFcAdgGMMASziKwbOAApxTQgEoK3Oe13lUYMPWEtmqbkdRA
Contributor guide
Assessment
This issue has not been assessed yet.