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

Compile error with overloads and or types #11382

Closed
dbaeumer opened this issue Oct 5, 2016 · 2 comments
Closed

Compile error with overloads and or types #11382

dbaeumer opened this issue Oct 5, 2016 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@dbaeumer
Copy link
Member

dbaeumer commented Oct 5, 2016

TypeScript Version: 2.0.3
Code

let x: string | number;

function foo(x: string);
function foo(x: number);
function foo(x: string | number) {

}
foo(x);

Produces a compile error. IMO the code should be fine.

@yortus
Copy link
Contributor

yortus commented Oct 5, 2016

Duplicate of #1805

@RyanCavanaugh RyanCavanaugh added the Duplicate An existing issue was already created label Oct 5, 2016
@RyanCavanaugh
Copy link
Member

In the future, all TypeScript bugs are duplicates.

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 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
Projects
None yet
Development

No branches or pull requests

3 participants