@@ -4239,7 +4239,7 @@ func (c *Checker) checkBaseTypeAccessibility(t *Type, node *ast.Node) {
4239
4239
signatures := c.getSignaturesOfType(t, SignatureKindConstruct)
4240
4240
if len(signatures) != 0 {
4241
4241
declaration := signatures[0].declaration
4242
- if declaration != nil && HasModifier(declaration, ast.ModifierFlagsPrivate) {
4242
+ if declaration != nil && ast. HasModifier(declaration, ast.ModifierFlagsPrivate) {
4243
4243
typeClassDeclaration := ast.GetClassLikeDeclarationOfSymbol(t.symbol)
4244
4244
if !c.isNodeWithinClass(node, typeClassDeclaration) {
4245
4245
c.error(node, diagnostics.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private, c.getFullyQualifiedName(t.symbol, nil))
@@ -6452,7 +6452,7 @@ func (c *Checker) checkAliasSymbol(node *ast.Node) {
6452
6452
name := node.PropertyNameOrName().Text()
6453
6453
c.addTypeOnlyDeclarationRelatedInfo(c.error(node, message, name), core.IfElse(isType, nil, typeOnlyAlias), name)
6454
6454
}
6455
- if isType && node.Kind == ast.KindImportEqualsDeclaration && HasModifier(node, ast.ModifierFlagsExport) {
6455
+ if isType && node.Kind == ast.KindImportEqualsDeclaration && ast. HasModifier(node, ast.ModifierFlagsExport) {
6456
6456
c.error(node, diagnostics.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled, c.getIsolatedModulesLikeFlagName())
6457
6457
}
6458
6458
case ast.KindExportSpecifier:
@@ -6740,7 +6740,7 @@ func (c *Checker) checkUnusedClassMembers(node *ast.Node) {
6740
6740
break // Already would have reported an error on the getter.
6741
6741
}
6742
6742
symbol := c.getSymbolOfDeclaration(member)
6743
- if !c.isReferenced(symbol) && (HasModifier(member, ast.ModifierFlagsPrivate) || member.Name() != nil && ast.IsPrivateIdentifier(member.Name())) && member.Flags&ast.NodeFlagsAmbient == 0 {
6743
+ if !c.isReferenced(symbol) && (ast. HasModifier(member, ast.ModifierFlagsPrivate) || member.Name() != nil && ast.IsPrivateIdentifier(member.Name())) && member.Flags&ast.NodeFlagsAmbient == 0 {
6744
6744
c.reportUnused(member, UnusedKindLocal, NewDiagnosticForNode(member.Name(), diagnostics.X_0_is_declared_but_its_value_is_never_read, c.symbolToString(symbol)))
6745
6745
}
6746
6746
case ast.KindConstructor:
@@ -8299,7 +8299,7 @@ func (c *Checker) resolveNewExpression(node *ast.Node, candidatesOutArray *[]*Si
8299
8299
}
8300
8300
if expressionType.symbol != nil {
8301
8301
valueDecl := ast.GetClassLikeDeclarationOfSymbol(expressionType.symbol)
8302
- if valueDecl != nil && HasModifier(valueDecl, ast.ModifierFlagsAbstract) {
8302
+ if valueDecl != nil && ast. HasModifier(valueDecl, ast.ModifierFlagsAbstract) {
8303
8303
c.error(node, diagnostics.Cannot_create_an_instance_of_an_abstract_class)
8304
8304
return c.resolveErrorCall(node)
8305
8305
}
@@ -18779,7 +18779,7 @@ func (c *Checker) getIndexInfosOfIndexSymbol(indexSymbol *ast.Symbol, siblingSym
18779
18779
}
18780
18780
forEachType(c.getTypeFromTypeNode(typeNode), func(keyType *Type) {
18781
18781
if c.isValidIndexKeyType(keyType) && findIndexInfo(indexInfos, keyType) == nil {
18782
- indexInfo := c.newIndexInfo(keyType, valueType, HasModifier(declaration, ast.ModifierFlagsReadonly), declaration)
18782
+ indexInfo := c.newIndexInfo(keyType, valueType, ast. HasModifier(declaration, ast.ModifierFlagsReadonly), declaration)
18783
18783
indexInfos = append(indexInfos, indexInfo)
18784
18784
}
18785
18785
})
@@ -26671,7 +26671,7 @@ func (c *Checker) markPropertyAsReferenced(prop *ast.Symbol, nodeForCheckWriteOn
26671
26671
if prop.Flags&ast.SymbolFlagsClassMember == 0 || prop.ValueDeclaration == nil {
26672
26672
return
26673
26673
}
26674
- hasPrivateModifier := HasModifier(prop.ValueDeclaration, ast.ModifierFlagsPrivate)
26674
+ hasPrivateModifier := ast. HasModifier(prop.ValueDeclaration, ast.ModifierFlagsPrivate)
26675
26675
hasPrivateIdentifier := prop.ValueDeclaration.Name() != nil && ast.IsPrivateIdentifier(prop.ValueDeclaration.Name())
26676
26676
if !hasPrivateModifier && !hasPrivateIdentifier {
26677
26677
return
0 commit comments