Skip to content

Wrong error position with generic application #8019

Open
@goodmind

Description

@goodmind

Flow version: 0.105.2

type Event<E, T> = {
  hey: E,
  target: T,
}

type F = Event<number>;

const m: F = {};

Expected behavior

6:  Event<number>
            ^ Cannot use `Event` [1] with fewer than 2 type arguments.
References:
1: type Event<E, T> = {
             ^ [1]

Actual behavior

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions