Skip to content

Array offset is not being applied to unions #242

@tomblind

Description

@tomblind
declare function foo(): [string, string] | [number, number];
let a = foo();
let b = a[0];

declare function bar(): string[] | number[];
let c = bar();
let d = c[0];
local a = foo();
local b = a[0]; --Needs +1

local c = bar();
local d = c[0]; --Needs +1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions