facebook / facebook/flow

Wrong error position with generic application

Open
#8,019 0 comments 1 reaction 0 assignees View on GitHub
bug error messages Typing: polymorphism
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 Event = {
hey: E,
target: T,
}

type F = Event;

const m: F = {};
```

## Expected behavior

```
6: Event
^ Cannot use `Event` [1] with fewer than 2 type arguments.
References:
1: type Event = {
^ [1]
```

## Actual behavior

```
8: const m: F = {};
^ Cannot use `F` [1] with fewer than 2 type arguments.
References:
1: type Event = {
^ [1]
```

* Link to Try-Flow or Github repo: https://flow.org/try/#0C4TwDgpgBAogbhAdsAPDANFAKgPigXigG8AoKKACwhAC5Z0ypgBDAJwHMJg6sGBfEiVCQoAMQKwEyFIgCuAWwBGEVjgDcggMYB7RAGdgUeXXGEifNUA

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.