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

Report an error if a class is inherited from before it is defined #754

Closed
bsr203 opened this issue Sep 26, 2014 · 3 comments
Closed

Report an error if a class is inherited from before it is defined #754

bsr203 opened this issue Sep 26, 2014 · 3 comments
Labels
Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. Suggestion An idea for TypeScript

Comments

@bsr203
Copy link

bsr203 commented Sep 26, 2014

Hello,

I am having the same issue, which had lot of activity on codeplex.
https://typescript.codeplex.com/workitem/627

class A extends B {
  // ...
}

class B {
  // ...
}

Compiles without error but obviously fails at runtime.

@danquirk
Copy link
Member

danquirk commented Oct 7, 2014

Edited the original issue for clarity. We've had this request for awhile but have generally avoided trying to handle ordering issues, instead leaving it up to the user because in the general case we can't really give you all the errors you'd want. We would need a more structured look at the various use cases and how we might give an error in some or all of them.

@danquirk danquirk added Suggestion An idea for TypeScript Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. Needs More Info The issue still hasn't been fully clarified labels Oct 7, 2014
@danquirk danquirk changed the title codeplex.com/workitem/627 : Inheritance only works if parent class is declared before child class. Report an error if a class is inherited from before it is defined Oct 7, 2014
@mhegazy mhegazy removed the Needs More Info The issue still hasn't been fully clarified label May 21, 2015
@mhegazy
Copy link
Contributor

mhegazy commented May 21, 2015

more details can be found at: #21

@RyanCavanaugh
Copy link
Member

We do this now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

4 participants