mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge pull request #5860 from Microsoft/superPropertiesInES6
do not error on 'super' property access in ES6
This commit is contained in:
@@ -8386,7 +8386,7 @@ namespace ts {
|
||||
// - In a static member function or static member accessor
|
||||
// where this references the constructor function object of a derived class,
|
||||
// a super property access is permitted and must specify a public static member function of the base class.
|
||||
if (getDeclarationKindFromSymbol(prop) !== SyntaxKind.MethodDeclaration) {
|
||||
if (languageVersion < ScriptTarget.ES6 && getDeclarationKindFromSymbol(prop) !== SyntaxKind.MethodDeclaration) {
|
||||
// `prop` refers to a *property* declared in the super class
|
||||
// rather than a *method*, so it does not satisfy the above criteria.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user