Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Either type not expanded for overload resolution #16412

Closed
mjbvz opened this issue Jun 9, 2017 · 1 comment
Closed

Either type not expanded for overload resolution #16412

mjbvz opened this issue Jun 9, 2017 · 1 comment
Labels
Duplicate An existing issue was already created VS Code Tracked There is a VS Code equivalent to this issue

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Jun 9, 2017

From microsoft/vscode#28293

TypeScript Version: 2.4.0-20170609
Code

interface IFace {
	do(x: number): number
	do(x: string): string
}

function func(param: number | string, obj: IFace) {
	obj.do(param);
}

Expected behavior:
No compile errors. We have do overloads for both both types of params

Actual behavior:
Compile error. No overload found for do with argument of type number | string

// cc @roblourens

@mjbvz mjbvz added the VS Code Tracked There is a VS Code equivalent to this issue label Jun 9, 2017
@mhegazy
Copy link
Contributor

mhegazy commented Jun 9, 2017

duplicate of #14107

@mhegazy mhegazy closed this as completed Jun 9, 2017
@mhegazy mhegazy added the Duplicate An existing issue was already created label Jun 9, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created VS Code Tracked There is a VS Code equivalent to this issue
Projects
None yet
Development

No branches or pull requests

2 participants