Merge pull request #5860 from Microsoft/superPropertiesInES6

do not error on 'super' property access in ES6
This commit is contained in:
Vladimir Matveev
2015-12-11 13:20:20 -08:00
8 changed files with 406 additions and 1 deletions
+1 -1
View File
@@ -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.