-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
From @alexandrudima on January 27, 2016 10:49
Testing #2218
function a1() {
return 5;
}
function a2() {
if (1) {
return 5;
} else {
return '5';
}
}
Hovering over a1() shows its return type is number
. Hovering over a2() shows its return type is any
. IMHO it should show number|string
-- maybe this inference code was written before or types were introduced?
Copied from original issue: microsoft/vscode#2431
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue