Skip to content

fixed function expression inference in binary operators#472

Merged
tomblind merged 1 commit intomasterfrom
function-inference-fixes-2
Mar 10, 2019
Merged

fixed function expression inference in binary operators#472
tomblind merged 1 commit intomasterfrom
function-inference-fixes-2

Conversation

@tomblind
Copy link
Copy Markdown
Collaborator

fixes this scenario:

let callback: (this: void, a: number) => number;
declare const undefinedCallback: typeof callback;
callback = undefinedCallback || (a => a+1); // fallback gets transpiled with context
callback(3); // errors with arithmetic on a nil value

@tomblind tomblind merged commit 73b13b6 into master Mar 10, 2019
@tomblind tomblind deleted the function-inference-fixes-2 branch March 10, 2019 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants