Intersection of union type cannot be assigned to that union type
オープン
- 主要言語
- Rust
- スター
- 22.3k
- フォーク
- 1.9k
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
[Reproducible Code Snippet](https://flowtype.org/try/#0C4TwDgpgBAglC8UDeUCGAuKBnYAnAlgHYDmUAvgFCiRQBCCyUARpjgSeVeNAMIMoBjVniKlK1aDHqI4AHzpcaMAB7TYUAGQKJsWsr4z6WnhQoAzAK6EBwfAHtCUYBBwBGABQZYAGjQtdvqjK-iq0gUzKQrr6AJTIFFBoDEFMCX7JEQIUZEA):
```javascript
type A = { a: string }
type B = { b: string }
type C = { c: string }
type AB = A | B
type AxB = A & B
type ABxC = AB & C
function test1(a: A, ab: AB, axb: AxB, abxc: ABxC) {
a = axb
ab = abxc // error
}
```
コントリビューションガイド
評価
この issue はまだ評価されていません。