Skip to content

3.4 regression for type argument inference #30390

Closed
@DanielRosenwasser

Description

@DanielRosenwasser

Found trying to compile VS Code at https://github.com/Microsoft/vscode/blob/1ce2b64abb08ed7998a5a6697ba0248a51934605/src/vs/workbench/services/textfile/common/textFileService.ts#L294-L338

Isolated repro:

function blah(): Promise<{ success: boolean }> {
    return Promise.resolve(100).then(() => {
        if (Math.random()) {
            return {
                success: true
            }
        }
        return Promise.resolve({ success: false })
    })
}

Metadata

Metadata

Assignees

Labels

Breaking ChangeWould introduce errors in existing codeFix AvailableA PR has been opened for this issueNeeds InvestigationThis issue needs a team member to investigate its status.RescheduledThis issue was previously scheduled to an earlier milestone

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions