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

combined output causes error when there is an inheritance (order in file is wrong) #3671

Closed
mdzieg opened this issue Jun 29, 2015 · 3 comments
Labels
Duplicate An existing issue was already created

Comments

@mdzieg
Copy link

mdzieg commented Jun 29, 2015

In solution (Visual Studio 2013) with a couple of separate ts files, when one class extends another one and files are combined together, it may happen that resulting file causes exception in __extends method. Second parameter has undefined value (derived class goes first, parent class is not yet defined).

I think that parent classes should be placed before derived ones.

@mhegazy
Copy link
Contributor

mhegazy commented Jun 29, 2015

The compiler does not reorder emitted code. the files are emitted in order supplied on the commandline and through resolving /// references. you can either move the derived class definition to be after the base, or add a /// <reference> tag to the file with the derived class pointing to the file with the base class to ensure correct emit order.

See #21 for more details about this issue.

@mhegazy mhegazy added the Duplicate An existing issue was already created label Jun 29, 2015
@mdzieg
Copy link
Author

mdzieg commented Jun 30, 2015

Thank you @mhegazy. This seems to be exactly what I need.

@mhegazy
Copy link
Contributor

mhegazy commented Jun 30, 2015

glad it helped.

@mhegazy mhegazy closed this as completed Jun 30, 2015
@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

2 participants