Skip to content

[Spec] Hiding of call/construct signatures #87

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

Closed
mhegazy opened this issue Jul 17, 2014 · 2 comments
Closed

[Spec] Hiding of call/construct signatures #87

mhegazy opened this issue Jul 17, 2014 · 2 comments
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue Spec Issues related to the TypeScript language specification

Comments

@mhegazy
Copy link
Contributor

mhegazy commented Jul 17, 2014

interface Base2 { 
   (x: number): number;
}
interface I2 extends Base2 {
   (x: number): string;  // error because base returns non-void
}

This code is illegal in 1.0 because call signature in I2 hides one in Base2. We've discussed that that this restriction should be relaxed as it covers very limited surface

@mhegazy mhegazy added this to the TypeScript 1.1 milestone Jul 17, 2014
@mhegazy mhegazy added the Spec label Jul 17, 2014
@ahejlsberg ahejlsberg changed the title [Spec] Hiding of call\construct signatures [Spec] Hiding of call/construct signatures Jul 17, 2014
@sophiajt
Copy link
Contributor

Just need to update the spec to reflect that signatures never hide each other.

@RyanCavanaugh
Copy link
Member

Would be good to understand why this is desirable?

@RyanCavanaugh RyanCavanaugh added the Fixed A PR has been merged for this issue label Sep 11, 2014
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue Spec Issues related to the TypeScript language specification
Projects
None yet
Development

No branches or pull requests

5 participants