@@ -340,14 +340,14 @@ module ts {
340
340
// TypeScript 1.0 spec (April 2014): 8.4.1
341
341
// Initializer expressions for instance member variables are evaluated in the scope
342
342
// of the class constructor body but are not permitted to reference parameters or
343
- // local variables of the constructor.This effectively means that entities from outer scopes
343
+ // local variables of the constructor. This effectively means that entities from outer scopes
344
344
// by the same name as a constructor parameter or local variable are inaccessible
345
345
// in initializer expressions for instance member variables.
346
346
if ( location . parent . kind === SyntaxKind . ClassDeclaration && ! ( location . flags & NodeFlags . Static ) ) {
347
347
var ctor = findConstructorDeclaration ( < ClassDeclaration > location . parent ) ;
348
348
if ( ctor && ctor . locals ) {
349
349
if ( getSymbol ( ctor . locals , name , meaning & SymbolFlags . Value ) ) {
350
- // save the property node - later it will be used by 'returnResolvedSymbol' to report appropriate error
350
+ // Remember the property node, it will be used later to report appropriate error
351
351
propertyWithInvalidInitializer = location ;
352
352
}
353
353
}
@@ -358,8 +358,8 @@ module ts {
358
358
if ( result = getSymbol ( getSymbolOfNode ( location ) . members , name , meaning & SymbolFlags . Type ) ) {
359
359
if ( lastLocation && lastLocation . flags & NodeFlags . Static ) {
360
360
// TypeScript 1.0 spec (April 2014): 3.4.1
361
- // The scope of a type parameter extends over the entire declaration
362
- // with which the type parameter list is associated, with the exception of static member declarations in classes.
361
+ // The scope of a type parameter extends over the entire declaration with which the type
362
+ // parameter list is associated, with the exception of static member declarations in classes.
363
363
error ( errorLocation , Diagnostics . Static_members_cannot_reference_class_type_parameters ) ;
364
364
return undefined ;
365
365
}
0 commit comments