@@ -7191,7 +7191,7 @@ namespace ts {
7191
7191
*/
7192
7192
function checkClassPropertyAccess(node: PropertyAccessExpression | QualifiedName, left: Expression | QualifiedName, type: Type, prop: Symbol): boolean {
7193
7193
let flags = getDeclarationFlagsFromSymbol(prop);
7194
- let declaringClass: InterfaceType;
7194
+ let declaringClass = < InterfaceType>getDeclaredTypeOfSymbol(prop.parent); ;
7195
7195
7196
7196
if (left.kind === SyntaxKind.SuperKeyword) {
7197
7197
let errorNode = (<PropertyAccessExpression>node).name ?
@@ -7219,8 +7219,6 @@ namespace ts {
7219
7219
// cannot simultaneously be private and abstract, so this will trigger an
7220
7220
// additional error elsewhere.
7221
7221
7222
- declaringClass = <InterfaceType>getDeclaredTypeOfSymbol(prop.parent);
7223
-
7224
7222
error(errorNode, Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression, symbolToString(prop), typeToString(declaringClass));
7225
7223
return false;
7226
7224
}
@@ -7236,7 +7234,6 @@ namespace ts {
7236
7234
let enclosingClassDeclaration = getContainingClass(node);
7237
7235
7238
7236
let enclosingClass = enclosingClassDeclaration ? <InterfaceType>getDeclaredTypeOfSymbol(getSymbolOfNode(enclosingClassDeclaration)) : undefined;
7239
- declaringClass = <InterfaceType>getDeclaredTypeOfSymbol(prop.parent);
7240
7237
7241
7238
// Private property is accessible if declaring and enclosing class are the same
7242
7239
if (flags & NodeFlags.Private) {
@@ -8391,7 +8388,7 @@ namespace ts {
8391
8388
8392
8389
let expressionType = checkExpression(node.expression);
8393
8390
8394
- // If ConstructExpr 's apparent type(section 3.8.1) is an object type with one or
8391
+ // If expressionType 's apparent type(section 3.8.1) is an object type with one or
8395
8392
// more construct signatures, the expression is processed in the same manner as a
8396
8393
// function call, but using the construct signatures as the initial set of candidate
8397
8394
// signatures for overload resolution. The result type of the function call becomes
@@ -8402,7 +8399,7 @@ namespace ts {
8402
8399
return resolveErrorCall(node);
8403
8400
}
8404
8401
8405
- // If the expression is of abstract type, then it cannot be instantiated.
8402
+ // If the expression is a class of abstract type, then it cannot be instantiated.
8406
8403
// Note, only class declarations can be declared abstract.
8407
8404
// In the case of a merged class-module or class-interface declaration,
8408
8405
// only the class declaration node will have the Abstract flag set.
@@ -8412,7 +8409,7 @@ namespace ts {
8412
8409
}
8413
8410
8414
8411
// TS 1.0 spec: 4.11
8415
- // If ConstructExpr is of type Any, Args can be any argument
8412
+ // If expressionType is of type Any, Args can be any argument
8416
8413
// list and the result of the operation is of type Any.
8417
8414
if (isTypeAny(expressionType)) {
8418
8415
if (node.typeArguments) {
@@ -8430,7 +8427,7 @@ namespace ts {
8430
8427
return resolveCall(node, constructSignatures, candidatesOutArray);
8431
8428
}
8432
8429
8433
- // If ConstructExpr 's apparent type is an object type with no construct signatures but
8430
+ // If expressionType 's apparent type is an object type with no construct signatures but
8434
8431
// one or more call signatures, the expression is processed as a function call. A compile-time
8435
8432
// error occurs if the result of the function call is not Void. The type of the result of the
8436
8433
// operation is Any.
@@ -13838,6 +13835,12 @@ namespace ts {
13838
13835
return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "private", "abstract");
13839
13836
}
13840
13837
}
13838
+ else {
13839
+ // mark the constructor abstract for static-side assignability restrictions.
13840
+
13841
+ // (<ClassDeclaration>node).members.????;
13842
+
13843
+ }
13841
13844
13842
13845
flags |= NodeFlags.Abstract;
13843
13846
break;
0 commit comments