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

Class Declaration Extends Null Can't have super-call #6968

Closed
yuit opened this issue Feb 8, 2016 · 8 comments
Closed

Class Declaration Extends Null Can't have super-call #6968

yuit opened this issue Feb 8, 2016 · 8 comments
Assignees
Labels
Spec Issues related to the TypeScript language specification

Comments

@yuit
Copy link
Contributor

yuit commented Feb 8, 2016

As pointed out by @DanielRosenwasser in the PR #6860, our spec is not up-to-date regarding class extends null here Also we should update the comment in lin Checker.ts line in checkConstructorDeclaration

@RyanCavanaugh
Copy link
Member

@yuit is this a spec bug or an implementation bug?

@mhegazy mhegazy added the Spec Issues related to the TypeScript language specification label Feb 19, 2016
@e-cloud
Copy link
Contributor

e-cloud commented Dec 1, 2016

@RyanCavanaugh yes, it's a spec bug before. But the spec has been fixed for months.

See tc39/ecma262#543

And now Typescript is violating the spec.

@mhegazy
Copy link
Contributor

mhegazy commented Dec 1, 2016

this issue is tracking updating the TypeScript spec and not the ECMAScript spec. I am not sure how the compiler is violating the spec, the compiler gives you an error if you try to access super in a class that extends null.

@e-cloud
Copy link
Contributor

e-cloud commented Dec 2, 2016

But the Typescript spec is "old" as v1.8. now the source have been v2.1.

As the sologan says:
image

Shouldn't the spec of Typescript be the superset of ECMAScript spec?

@mhegazy
Copy link
Contributor

mhegazy commented Dec 2, 2016

The spec is a super set of ECMAScript. As a matter of fact, the TypeScript spec clearly states it is an augmentation to the ECMAScript 2015 spec (emphasis mine):

The remainder of this document is the formal specification of the TypeScript programming language and is intended to be read as an adjunct to the ECMAScript 2015 Language Specification (specifically, the ECMA-262 Standard, 6th Edition). This document describes the syntactic grammar added by TypeScript along with the compile-time processing and type checking performed by the TypeScript compiler, but it only minimally discusses the run-time behavior of programs since that is covered by the ECMAScript specification.

So any ES2015 feature or spec change is implicitly included in the TS spec.

As for the spec not being updated. yes, this is an issue, we are working on updating the spec. but we are small team, and we have been busy at work getting some awesome new features out. bear with us for a little bit and the spec should be updated to reflect these features.

@e-cloud
Copy link
Contributor

e-cloud commented Dec 2, 2016

I really appreciate the effort your team have made for a greater Typescript.

If my words offend you, I apologize for it.

What i commmented is just for reminding. It may has low priority.

@mhegazy
Copy link
Contributor

mhegazy commented Dec 2, 2016

No offense taken, and no apologies required. The spec is out of date, and we need to update it. Your feedback is important to us, so keep it coming!

@saschanaz
Copy link
Contributor

One year later: The tc39/ecma262#543 is reverted by tc39/ecma262#781.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Spec Issues related to the TypeScript language specification
Projects
None yet
Development

No branches or pull requests

6 participants