@artel/artc 0.6.25283 → 0.6.25284

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/build/Cli.js +3 -3
  2. package/build/api/Api.js +26 -14
  3. package/build/api/ApiNodeJS.js +3 -3
  4. package/build/api/ApiServices.js +828 -700
  5. package/build/{chunk-2Q4QKW7T.js → chunk-CGOSDN2E.js} +20378 -18371
  6. package/build/{chunk-MJ2ZVHII.js → chunk-OBX375YX.js} +1 -1
  7. package/build/{chunk-7RAZAZE6.js → chunk-ZV3UW5X6.js} +2 -2
  8. package/build/types/analysis/AccessibilityCheck.d.ts +20 -0
  9. package/build/types/analysis/Analyzer.d.ts +16 -8
  10. package/build/types/analysis/BaseMemberConflictsValidator.d.ts +2 -4
  11. package/build/types/analysis/ConstructorCallResolver.d.ts +3 -4
  12. package/build/types/analysis/MemberAccessExpressionMeaning.d.ts +2 -1
  13. package/build/types/analysis/ModifierValidator.d.ts +17 -15
  14. package/build/types/analysis/NodeTypeUtils.d.ts +3 -3
  15. package/build/types/analysis/PackageMemberLookup.d.ts +11 -4
  16. package/build/types/analysis/ReachabilityChecker.d.ts +27 -0
  17. package/build/types/analysis/ReductionSourceMemberFinder.d.ts +20 -0
  18. package/build/types/analysis/ReservedNameDictionary.d.ts +14 -0
  19. package/build/types/analysis/SourceFileAnalyzer.d.ts +3 -0
  20. package/build/types/analysis/TypeArgumentInferrer.d.ts +1 -0
  21. package/build/types/analysis/TypeMemberLookup.d.ts +36 -22
  22. package/build/types/analysis/Utils.d.ts +2 -0
  23. package/build/types/analysis/WellKnownDeclarations.d.ts +11 -7
  24. package/build/types/analysis/control-flow/GraphBuilder.d.ts +4 -1
  25. package/build/types/analysis/semantic-context/FieldWithInitializerSemanticContext.d.ts +4 -2
  26. package/build/types/analysis/semantic-context/SemanticContextBase.d.ts +6 -5
  27. package/build/types/analysis/semantic-context/SemanticContextValidatingNameConflicts.d.ts +2 -2
  28. package/build/types/analysis/semantic-context/SemanticContextWithParent.d.ts +2 -0
  29. package/build/types/analysis/semantic-context/SourceFileSemanticContext.d.ts +9 -4
  30. package/build/types/analysis/semantic-context/SubprogramBodyAndParametersSemanticContext.d.ts +5 -5
  31. package/build/types/analysis/semantic-context/SubprogramSemanticContext.d.ts +2 -2
  32. package/build/types/analysis/semantic-context/TypeSemanticContext.d.ts +14 -11
  33. package/build/types/api/Api.d.ts +1 -1
  34. package/build/types/common/LocalizationHelper.d.ts +2 -2
  35. package/build/types/common/index.d.ts +0 -1
  36. package/build/types/diagnostic/DiagnosticCode.d.ts +154 -141
  37. package/build/types/emitter/Entities.d.ts +5 -4
  38. package/build/types/emitter/EntityMap.d.ts +4 -0
  39. package/build/types/emitter/IrBuilder.d.ts +1 -0
  40. package/build/types/entities/Entity.d.ts +9 -6
  41. package/build/types/entities/EntityHiding.d.ts +1 -4
  42. package/build/types/entities/EntityLocalizationContext.d.ts +3 -2
  43. package/build/types/entities/TypeEntity.d.ts +4 -3
  44. package/build/types/entities/index.d.ts +0 -2
  45. package/build/types/entities/interfaces/AliasTypeEntity.d.ts +2 -2
  46. package/build/types/entities/interfaces/ConstructorEntity.d.ts +3 -1
  47. package/build/types/entities/interfaces/DereferenceOperatorEntity.d.ts +2 -1
  48. package/build/types/entities/interfaces/DestructorEntity.d.ts +4 -1
  49. package/build/types/entities/interfaces/FunctionEntity.d.ts +3 -1
  50. package/build/types/entities/interfaces/IndexerEntity.d.ts +2 -1
  51. package/build/types/entities/interfaces/OperatorEntity.d.ts +3 -1
  52. package/build/types/entities/interfaces/ReducedTypeEntity.d.ts +99 -0
  53. package/build/types/entities/interfaces/TypeParameterEntity.d.ts +2 -2
  54. package/build/types/entities/interfaces/VariableEntity.d.ts +2 -1
  55. package/build/types/entities/interfaces/index.d.ts +1 -0
  56. package/build/types/entities/intrinsic/IntrinsicConstructorEntity.d.ts +3 -1
  57. package/build/types/entities/intrinsic/IntrinsicFunctionEntity.d.ts +2 -1
  58. package/build/types/entities/intrinsic/IntrinsicVariableEntity.d.ts +2 -1
  59. package/build/types/entities/source/SourceConstructorEntity.d.ts +6 -2
  60. package/build/types/entities/source/SourceDereferenceOperatorEntity.d.ts +3 -1
  61. package/build/types/entities/source/SourceDestructorEntity.d.ts +6 -1
  62. package/build/types/entities/source/SourceFunctionEntity.d.ts +5 -1
  63. package/build/types/entities/source/SourceIndexerEntity.d.ts +3 -1
  64. package/build/types/entities/source/SourceOperatorEntity.d.ts +5 -1
  65. package/build/types/entities/source/SourceReducedTypeEntity.d.ts +44 -0
  66. package/build/types/entities/source/SourceVariableEntity.d.ts +7 -1
  67. package/build/types/entities/source/index.d.ts +1 -0
  68. package/build/types/entities/translated/TranslatedConstructorEntity.d.ts +9 -4
  69. package/build/types/entities/translated/TranslatedDereferenceOperatorEntity.d.ts +3 -1
  70. package/build/types/entities/translated/TranslatedDestructorEntity.d.ts +4 -1
  71. package/build/types/entities/translated/TranslatedFunctionEntity.d.ts +3 -1
  72. package/build/types/entities/translated/TranslatedIndexerEntity.d.ts +3 -1
  73. package/build/types/entities/translated/TranslatedOperatorEntity.d.ts +3 -1
  74. package/build/types/entities/translated/TranslatedReducedTypeEntity.d.ts +59 -0
  75. package/build/types/entities/translated/TranslatedVariableEntity.d.ts +3 -1
  76. package/build/types/entities/translated/index.d.ts +1 -0
  77. package/build/types/project/SourceFile.d.ts +3 -1
  78. package/build/types/services/CompletionService.d.ts +5 -4
  79. package/build/types/services/DisplayService.d.ts +70 -3
  80. package/build/types/services/TranslationService.d.ts +1 -1
  81. package/build/types/services/source-generation/EntityToSyntax.d.ts +4 -0
  82. package/build/types/tree/KeywordKind.d.ts +57 -56
  83. package/build/types/tree/NodeKind.d.ts +142 -140
  84. package/build/types/tree/Nodes.d.ts +51 -11
  85. package/build/types/tree/SyntaxFactory.d.ts +2 -0
  86. package/build/types/tree/SyntaxToCode.d.ts +1 -0
  87. package/build/types/ts-interop/Entities.d.ts +10 -1
  88. package/build/types/ts-interop/TsPackageMembersCreator.d.ts +1 -1
  89. package/build/types/types/ReducedType.d.ts +24 -0
  90. package/build/types/types/Type.d.ts +2 -1
  91. package/build/types/types/TypeFactory.d.ts +3 -2
  92. package/build/types/types/index.d.ts +1 -0
  93. package/package.json +1 -1
  94. package/build/types/analysis/semantic-context/SemanticContextBasedEntityHidingMatcher.d.ts +0 -14
  95. package/build/types/entities/BaseEntityHidingMatcher.d.ts +0 -11
  96. package/build/types/entities/EntityHidingMatcherWithinTypeEntity.d.ts +0 -10
  97. package/build/types/parser/ReservedIdentifierDictionary.d.ts +0 -11
@@ -10,7 +10,7 @@ import {
10
10
  WellKnownDeclarationsLoadError,
11
11
  __async,
12
12
  createTsInteropInputsForCompilation
13
- } from "./chunk-2Q4QKW7T.js";
13
+ } from "./chunk-CGOSDN2E.js";
14
14
 
15
15
  // source/executor/Compiler.ts
16
16
  var Compiler = class {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Compiler
3
- } from "./chunk-MJ2ZVHII.js";
3
+ } from "./chunk-OBX375YX.js";
4
4
  import {
5
5
  ArtelVersion,
6
6
  Cached,
@@ -15,7 +15,7 @@ import {
15
15
  __async,
16
16
  performanceMeasurementStageNames,
17
17
  performanceMeasurementStages
18
- } from "./chunk-2Q4QKW7T.js";
18
+ } from "./chunk-CGOSDN2E.js";
19
19
 
20
20
  // source/executor/FileSystemUri.ts
21
21
  import { platform } from "os";
@@ -0,0 +1,20 @@
1
+ import { AccessorEntity, PackageMemberEntity, TypeMemberEntity } from '../entities/index.js';
2
+ import * as types from '../types/index.js';
3
+ import { PackageMemberLookupContext } from './PackageMemberLookup.js';
4
+ import { TypeMemberLookupContext } from './TypeMemberLookup.js';
5
+ export declare class AccessibilityCheck {
6
+ static isPackageMemberAccessible(entity: PackageMemberEntity | AccessorEntity, context: PackageMemberLookupContext): boolean;
7
+ /**
8
+ * Проверяет, доступен ли член типа в заданном контексте (в точке, где происходит обращение).
9
+ *
10
+ * Помимо контекста, на доступность членов типа, скрытых в иерархии типов, влияет тип объекта (`receiverType`),
11
+ * через который происходит обращение. Тип объекта должен быть равным или производным от типа, в рамках которого
12
+ * происходит доступ (`context.typeOrExtensionEntity`). Для всеобщих членов типа тип объекта не влияет на доступность.
13
+ * Это правило также не применяется при доступе через "основа", поскольку несмотря на то, что тип основы не является
14
+ * производным от типа, в котором происходит обращение, члены основы должны быть доступны в производном типе.
15
+ * Поэтому в случае доступа через "основа" в качестве значения параметра `ignoreReceiverType` передавать `true`.
16
+ */
17
+ static isTypeMemberAccessible(entity: TypeMemberEntity | AccessorEntity, context: TypeMemberLookupContext | undefined, receiverType: types.Type | undefined, ignoreReceiverType: boolean): boolean;
18
+ private static isTypeDerivedFromOrEquals;
19
+ private static isStaticTypeMemberOrAccessorEntity;
20
+ }
@@ -6,7 +6,6 @@ import { DiagnosticFlags, DiagnosticKind } from '../diagnostic/DiagnosticData.js
6
6
  import { WithDiagnostics } from '../diagnostic/WithDiagnostics.js';
7
7
  import { BinaryOperatorKind } from '../entities/OperatorKind.js';
8
8
  import * as e from '../entities/index.js';
9
- import { ReservedIdentifierKind } from '../parser/ReservedIdentifierDictionary.js';
10
9
  import * as project from '../project/index.js';
11
10
  import { PackageName, PlatformKind, SourcePackage } from '../project/index.js';
12
11
  import * as tree from '../tree/index.js';
@@ -31,12 +30,16 @@ import { NamedTypeSpecifierResolutionResult } from './NamedTypeSpecifierResolver
31
30
  import { DereferencedVariableAccessorDeclaration, FieldAccessorDeclaration, FunctionDeclaration, FunctionTypeDeclaration, GetterDeclaration, IndexedElementAccessorDeclaration, PackageVariableAccessorDeclaration, RegularOrBlockFunctionLiteral, SetterDeclaration, StructuredTypeDeclaration, TypeWithMembersDeclaration, VariantTypeDeclaration } from './NodeTypeUtils.js';
32
31
  import * as objectExpressionMeaning from './ObjectExpressionMeaning.js';
33
32
  import { OwnAndBaseConstructorCallsCheckResult } from './OwnAndBaseConstructorCallsChecker.js';
33
+ import { ReachabilityChecker } from './ReachabilityChecker.js';
34
+ import { ReductionSourceMemberFinder } from './ReductionSourceMemberFinder.js';
35
+ import { ReservedNameKind } from './ReservedNameDictionary.js';
34
36
  import { ResolvedImplementationPackage } from './ResolvedImplementationPackage.js';
35
37
  import { ResolvedTextTranslationPackage } from './ResolvedTextTranslationPackage.js';
36
38
  import * as tags from './Tag.js';
37
39
  import * as tagMeaning from './TagMeaning.js';
38
40
  import { TypeWithMembersOrTypeExtensionDeclaration } from './TreeQuery.js';
39
41
  import { TypeMemberImplementationCheckResult } from './TypeMemberImplementationChecker.js';
42
+ import { TypeMemberLookupContext } from './TypeMemberLookup.js';
40
43
  import * as controlFlow from './control-flow/index.js';
41
44
  import { WellKnownDeclarations } from './index.js';
42
45
  import * as semanticContext from './semantic-context/index.js';
@@ -73,6 +76,8 @@ export declare class Analyzer {
73
76
  readonly signatureComparer: SignatureComparer;
74
77
  readonly conflictsCheck: ConflictsCheck;
75
78
  readonly typeAssignabilityCheck: TypeAssignabilityCheck;
79
+ readonly reachabilityChecker: ReachabilityChecker;
80
+ readonly reductionSourceMemberFinder: ReductionSourceMemberFinder;
76
81
  private readonly tsInteropInputs;
77
82
  private readonly targetType;
78
83
  private readonly tsInterop_;
@@ -179,10 +184,11 @@ export declare class Analyzer {
179
184
  isExpressionOptionalChainingSyntactically(node: tree.Expression): boolean;
180
185
  isExpressionValidOutermostOptionalChaining(node: tree.Expression): boolean;
181
186
  includeNullToTypeIfExpressionValidOutermostOptionalChaining(type: types.Type, node: tree.Expression): types.Type;
182
- checkIdentifierNameIsReserved(name: string, locale: PackageLocale): ReservedIdentifierKind | undefined;
183
- getReservedIdentifierName(reservedIdentifierKind: ReservedIdentifierKind, locale: PackageLocale): string;
187
+ checkIdentifierNameIsReserved(name: Name, locale: PackageLocale): ReservedNameKind | undefined;
188
+ getReservedName(reservedNameKind: ReservedNameKind, locale: PackageLocale): Name;
184
189
  createNameFromIdentifier(node: tree.Identifier): Name;
185
190
  getImplicitBaseTypeForStructuredType(entity: e.StructuredTypeEntity): types.StructuredType | undefined;
191
+ getImplicitBaseTypeForReducedType(entity: e.ReducedTypeEntity): types.StructuredType;
186
192
  getImplicitBaseTypeForVariantType(locale: PackageLocale): types.StructuredType;
187
193
  getImplicitBaseTypeForFunctionType(locale: PackageLocale): types.StructuredType;
188
194
  resolveNamedTypeSpecifier(node: tree.NamedTypeSpecifier): NamedTypeSpecifierResolutionResult;
@@ -278,6 +284,8 @@ export declare class Analyzer {
278
284
  instantiateTypeMemberByIdentitySubstitution(entity: e.OperatorEntity): types.Operator;
279
285
  instantiateTypeMemberByIdentitySubstitution(entity: e.IndexerEntity): types.Indexer;
280
286
  instantiateTypeMemberByIdentitySubstitution(entity: e.DereferenceOperatorEntity): types.DereferenceOperator;
287
+ instantiateTypeMemberByIdentitySubstitution(entity: e.ConstructorEntity): types.Constructor;
288
+ instantiateTypeMemberByIdentitySubstitution(entity: e.DestructorEntity): types.Destructor;
281
289
  instantiateTypeMemberByIdentitySubstitution(entity: e.TypeMemberEntity): types.TypeMember;
282
290
  createPackageMemberHiding(node: tree.PackageMemberDeclaration, modifierFlags: ModifierFlags): e.EntityHidingLevel | undefined;
283
291
  createTypeMemberHiding(node: tree.TypeMemberDeclaration, modifierFlags: ModifierFlags): e.EntityHidingLevel | undefined;
@@ -320,10 +328,8 @@ export declare class Analyzer {
320
328
  checkTypeArgumentCount(typeArgumentCount: number, typeParameters: readonly e.TypeParameterEntity[], diagnostics?: DiagnosticAcceptor, nodeForDiagnostic?: tree.Node): boolean;
321
329
  checkTypeCanBeUsedAsValue(typeAccess: tree.Expression): boolean;
322
330
  getEntityDiagnosticLocation(entity: e.Entity, chooseSetter?: boolean): DiagnosticLocation | undefined;
323
- createTypeMemberLookupContextWithinType(type: e.TypeEntity): {
324
- hidingMatcher: e.IEntityHidingMatcher;
325
- typeExtensionLookup: semanticContext.SemanticContext | undefined;
326
- };
331
+ createTypeMemberLookupContextWithinType(type: e.TypeEntity): TypeMemberLookupContext;
332
+ isPossiblyCastedBaseExpression(node: tree.Expression): boolean;
327
333
  private createTsInterop;
328
334
  }
329
335
  export declare class TsInteropInputs {
@@ -388,7 +394,6 @@ declare class Type {
388
394
  constructor(analyzer: Analyzer);
389
395
  ofExpression(node: tree.Expression, analysisOptions?: ExpressionAnalysisOptions): types.Type;
390
396
  ofTypeSpecifier(node: tree.TypeSpecifier): types.Type;
391
- ofAccessedOperator(operator: types.Operator): types.Type;
392
397
  private ofExpressionWithoutGuard;
393
398
  private ofFunctionBlockLiteral;
394
399
  private ofFunctionLiteral;
@@ -472,6 +477,7 @@ declare class Entity {
472
477
  private readonly packageFunctionTypeEntities;
473
478
  private readonly anonymousFunctionTypeEntities;
474
479
  private readonly aliasTypeEntities;
480
+ private readonly reducedTypeEntities;
475
481
  private readonly packageFunctionEntities;
476
482
  private readonly methodEntities;
477
483
  private readonly nestedFunctionEntities;
@@ -508,6 +514,7 @@ declare class Entity {
508
514
  ofAnonymousVariantTypeDeclaration(node: tree.AnonymousVariantTypeDeclaration): e.AnonymousVariantTypeEntity;
509
515
  ofVariantTypeDeclaration(node: VariantTypeDeclaration): e.VariantTypeEntity;
510
516
  ofPackageAliasTypeDeclaration(node: tree.PackageAliasTypeDeclaration): e.AliasTypeEntity;
517
+ ofPackageReducedTypeDeclaration(node: tree.PackageReducedTypeDeclaration): e.ReducedTypeEntity;
511
518
  ofPackageFunctionDeclaration(node: tree.PackageFunctionDeclaration): e.PackageFunctionEntity;
512
519
  ofMethodDeclaration(node: tree.MethodDeclaration): e.MethodEntity;
513
520
  ofNestedFunctionDeclaration(node: tree.NestedFunctionDeclaration): e.NestedFunctionEntity;
@@ -701,6 +708,7 @@ declare class TypeAssignabilityCheck {
701
708
  getSingleFlagScore(flag: TypeAssignabilityFlags): number;
702
709
  getLowestFlagsScore(flags: TypeAssignabilityFlags): number;
703
710
  private getAssignabilityFlagsForStructuredTypes;
711
+ private isStructuredTypeDerivedFromOrEqualsTo;
704
712
  /**
705
713
  * @example
706
714
  * ```artel
@@ -1,16 +1,15 @@
1
1
  import { DiagnosticAcceptor } from '../diagnostic/Diagnostic.js';
2
- import { IEntityHidingMatcher, TypeEntityWithMembers } from '../entities/index.js';
2
+ import { TypeEntityWithMembers } from '../entities/index.js';
3
3
  import { Node } from '../tree/index.js';
4
4
  import { Analyzer } from './Analyzer.js';
5
5
  import { DiagnosticArgumentFactory } from './DiagnosticArgumentFactory.js';
6
6
  export declare class BaseMemberConflictsValidator {
7
7
  private readonly analyzer;
8
8
  private readonly typeEntity;
9
- private readonly hidingMatcher;
10
9
  private readonly diagnosticArgumentFactory;
11
10
  private readonly diagnostics;
12
11
  private readonly nodeForDiagnostic;
13
- constructor(analyzer: Analyzer, typeEntity: TypeEntityWithMembers, hidingMatcher: IEntityHidingMatcher, diagnosticArgumentFactory: DiagnosticArgumentFactory, diagnostics: DiagnosticAcceptor, nodeForDiagnostic: Node);
12
+ constructor(analyzer: Analyzer, typeEntity: TypeEntityWithMembers, diagnosticArgumentFactory: DiagnosticArgumentFactory, diagnostics: DiagnosticAcceptor, nodeForDiagnostic: Node);
14
13
  validate(): void;
15
14
  private getAllNotShadowedNotOverriddenMembers;
16
15
  private validateMemberConflicts;
@@ -20,7 +19,6 @@ export declare class BaseMemberConflictsValidator {
20
19
  private reportMembersConflictDiagnostic;
21
20
  private reportMembersOriginalNameConflictConflictDiagnostic;
22
21
  private addOverriddenMembersRecursively;
23
- private typeMemberMatchesHiding;
24
22
  private getOriginalTypeMemberNameConsideringOverriddenMembers;
25
23
  private getLeastOverriddenNamedMember;
26
24
  }
@@ -1,13 +1,12 @@
1
- import { PackageLocale } from '../common/index.js';
2
1
  import { DiagnosticAcceptorWithArgumentFactory } from '../diagnostic/Diagnostic.js';
3
- import { IEntityHidingMatcher, NamedTypeEntity } from '../entities/index.js';
2
+ import { NamedTypeEntity } from '../entities/index.js';
4
3
  import * as tree from '../tree/index.js';
5
4
  import * as types from '../types/index.js';
6
5
  import { Analyzer, ExpressionAnalysisOptions } from './Analyzer.js';
7
- import { SemanticContext } from './semantic-context/SemanticContext.js';
6
+ import { TypeMemberLookupContext } from './TypeMemberLookup.js';
8
7
  export declare class Resolver {
9
8
  static resolve(analyzer: Analyzer, candidates: readonly types.Constructor[], argumentList: tree.ArgumentList | undefined, diagnostics: DiagnosticAcceptorWithArgumentFactory | undefined, nodeForDiagnostic: tree.Node | undefined): readonly types.Constructor[];
10
- static resolveByNamedTypes(analyzer: Analyzer, typeEntities: readonly NamedTypeEntity[], argumentList: tree.ArgumentList | undefined, typeArgumentClause: tree.TypeArgumentClause | undefined, analysisOptions: ExpressionAnalysisOptions, locale: PackageLocale, hidingMatcher: IEntityHidingMatcher | undefined, typeExtensionLookup: SemanticContext | undefined, diagnostics: DiagnosticAcceptorWithArgumentFactory | undefined, nodeForDiagnostic: tree.Node | undefined): ResolutionResult;
9
+ static resolveByNamedTypes(analyzer: Analyzer, typeEntities: readonly NamedTypeEntity[], argumentList: tree.ArgumentList | undefined, typeArgumentClause: tree.TypeArgumentClause | undefined, analysisOptions: ExpressionAnalysisOptions, typeMemberLookupContext: TypeMemberLookupContext, diagnostics: DiagnosticAcceptorWithArgumentFactory | undefined, nodeForDiagnostic: tree.Node | undefined): ResolutionResult;
11
10
  private static typeCanBeConstructed;
12
11
  }
13
12
  export declare class ResolutionResult {
@@ -24,7 +24,8 @@ export declare class FirstStageResolver {
24
24
  private resolveStaticMemberOrVariantAccessMeaning;
25
25
  private resolveInstanceMemberAccessMeaning;
26
26
  private tryResolveInstanceOperatorAccessMeaning;
27
- private convertSyntacticAccessKind;
27
+ private convertPackageVariableSyntacticAccessKind;
28
+ private convertFieldSyntacticAccessKind;
28
29
  }
29
30
  export declare class SecondStageResolver {
30
31
  private readonly analyzer;
@@ -5,20 +5,21 @@ import { ModifierFlags } from './ModifierFlags.js';
5
5
  declare enum PackageMemberDeclarationKind {
6
6
  TranslationsDeclaration = 0,
7
7
  AliasTypeDeclaration = 1,
8
- MemberGroupDeclaration = 2,
9
- TypeExtensionDeclaration = 3,
10
- ConstructorDeclaration = 4,
11
- EntryPointDeclaration = 5,
12
- FunctionDeclaration = 6,
13
- FunctionTypeDeclaration = 7,
14
- ObjectTypeDeclaration = 8,
15
- PlainObjectTypeDeclaration = 9,
16
- AspectTypeDeclaration = 10,
17
- VariableDeclaration = 11,
18
- VariableGetterDeclaration = 12,
19
- VariableSetterDeclaration = 13,
20
- VariantTypeDeclaration = 14,
21
- InvalidDeclaration = 15
8
+ ReducedTypeDeclaration = 2,
9
+ MemberGroupDeclaration = 3,
10
+ TypeExtensionDeclaration = 4,
11
+ ConstructorDeclaration = 5,
12
+ EntryPointDeclaration = 6,
13
+ FunctionDeclaration = 7,
14
+ FunctionTypeDeclaration = 8,
15
+ ObjectTypeDeclaration = 9,
16
+ PlainObjectTypeDeclaration = 10,
17
+ AspectTypeDeclaration = 11,
18
+ VariableDeclaration = 12,
19
+ VariableGetterDeclaration = 13,
20
+ VariableSetterDeclaration = 14,
21
+ VariantTypeDeclaration = 15,
22
+ InvalidDeclaration = 16
22
23
  }
23
24
  type TypeMemberDeclarationKind = tree.TypeMemberDeclaration['kind'];
24
25
  export declare enum DeclarationWithTypeMembersKind {
@@ -27,7 +28,8 @@ export declare enum DeclarationWithTypeMembersKind {
27
28
  AspectType = 2,
28
29
  VariantType = 3,
29
30
  AliasType = 4,
30
- TypeExtension = 5
31
+ ReducedType = 5,
32
+ TypeExtension = 6
31
33
  }
32
34
  export declare class ModifierValidator {
33
35
  private readonly analyzer;
@@ -16,14 +16,14 @@ export declare class NodeTypeUtils {
16
16
  static isSubprogramDeclarationOrLiteral(node: tree.Node): node is SubprogramDeclarationOrLiteral;
17
17
  static isRegularOrBlockFunctionLiteral(node: tree.Node): node is RegularOrBlockFunctionLiteral;
18
18
  }
19
- export type PackageTypeDeclaration = tree.PackageAliasTypeDeclaration | tree.PackageFunctionTypeDeclaration | tree.PackageStructuredTypeDeclaration | tree.PackageVariantTypeDeclaration;
19
+ export type PackageTypeDeclaration = tree.PackageAliasTypeDeclaration | tree.PackageReducedTypeDeclaration | tree.PackageFunctionTypeDeclaration | tree.PackageStructuredTypeDeclaration | tree.PackageVariantTypeDeclaration;
20
20
  export type StructuredTypeDeclaration = tree.PackageStructuredTypeDeclaration | tree.AnonymousStructuredTypeDeclaration;
21
21
  export type VariantTypeDeclaration = tree.PackageVariantTypeDeclaration | tree.AnonymousVariantTypeDeclaration;
22
22
  export type FunctionTypeDeclaration = tree.PackageFunctionTypeDeclaration | tree.AnonymousFunctionTypeDeclaration;
23
23
  export type FunctionDeclaration = tree.PackageFunctionDeclaration | tree.NestedFunctionDeclaration | tree.MethodDeclaration;
24
24
  export type TypeDeclaration = StructuredTypeDeclaration | VariantTypeDeclaration | FunctionTypeDeclaration | tree.PackageAliasTypeDeclaration | tree.TypeParameterDeclaration;
25
- export type NamedTypeDeclaration = tree.PackageStructuredTypeDeclaration | tree.PackageVariantTypeDeclaration | tree.PackageFunctionTypeDeclaration | tree.PackageAliasTypeDeclaration | tree.TypeParameterDeclaration;
26
- export type TypeWithMembersDeclaration = StructuredTypeDeclaration | VariantTypeDeclaration | tree.PackageAliasTypeDeclaration;
25
+ export type NamedTypeDeclaration = tree.PackageStructuredTypeDeclaration | tree.PackageVariantTypeDeclaration | tree.PackageFunctionTypeDeclaration | tree.PackageAliasTypeDeclaration | tree.PackageReducedTypeDeclaration | tree.TypeParameterDeclaration;
26
+ export type TypeWithMembersDeclaration = StructuredTypeDeclaration | VariantTypeDeclaration | tree.PackageAliasTypeDeclaration | tree.PackageReducedTypeDeclaration;
27
27
  export type VariableDeclaration = tree.ForStatementVariableDeclaration | tree.PackageVariableDeclaration | tree.LocalVariableDeclaration | tree.ParameterDeclaration | tree.FieldDeclaration | tree.VariantValueDeclaration;
28
28
  export type GetterDeclaration = tree.PackageVariableGetterDeclaration | tree.FieldGetterDeclaration | tree.IndexedElementGetterDeclaration | tree.DereferencedVariableGetterDeclaration;
29
29
  export type SetterDeclaration = tree.PackageVariableSetterDeclaration | tree.FieldSetterDeclaration | tree.IndexedElementSetterDeclaration | tree.DereferencedVariableSetterDeclaration;
@@ -1,9 +1,16 @@
1
1
  import { Name } from '../common/index.js';
2
- import { IEntityHidingMatcher, NamedPackageMemberEntity, PackageEntity, TypeEntity, TypeExtensionEntity } from '../entities/index.js';
2
+ import { NamedPackageMemberEntity, PackageEntity, TypeEntity, TypeExtensionEntity } from '../entities/index.js';
3
+ import { SourceFile } from '../project/index.js';
3
4
  export declare class PackageMemberLookup {
4
5
  private readonly package_;
5
6
  constructor(package_: PackageEntity);
6
- getNamedMembers(hidingMatcher?: IEntityHidingMatcher): readonly NamedPackageMemberEntity[];
7
- getNamedMembersByName(name: Name, hidingMatcher?: IEntityHidingMatcher): readonly NamedPackageMemberEntity[];
8
- getTypeExtensions(type: TypeEntity, hidingMatcher?: IEntityHidingMatcher): readonly TypeExtensionEntity[];
7
+ getNamedMembers(context: PackageMemberLookupContext | undefined): readonly NamedPackageMemberEntity[];
8
+ getNamedMembersByName(name: Name, context: PackageMemberLookupContext | undefined): readonly NamedPackageMemberEntity[];
9
+ getTypeExtensions(type: TypeEntity, context: PackageMemberLookupContext | undefined): readonly TypeExtensionEntity[];
10
+ }
11
+ export declare class PackageMemberLookupContext {
12
+ readonly sourceFile: SourceFile | undefined;
13
+ readonly packageEntity: PackageEntity | undefined;
14
+ constructor(sourceFile: SourceFile | undefined, packageEntity: PackageEntity | undefined);
15
+ affectsAccessibility(): boolean;
9
16
  }
@@ -0,0 +1,27 @@
1
+ import { Analyzer } from './Analyzer.js';
2
+ import * as controlFlow from './control-flow/index.js';
3
+ export declare class ReachabilityChecker {
4
+ private readonly analyzer;
5
+ private readonly checkResults;
6
+ constructor(analyzer: Analyzer);
7
+ /**
8
+ * Проверяет, достижим ли узел графа потока управления с учётом семантики.
9
+ *
10
+ * Дополнительные проверки необходимы по причине того, что граф потока управления строится на основе синтаксического
11
+ * дерева и не учитывает семантику.
12
+ *
13
+ * Например, следующий код
14
+ * ```artel
15
+ * конст а = Объект()
16
+ * если не(а это Объект)
17
+ * {
18
+ * // ...
19
+ * }
20
+ * ```
21
+ *
22
+ * достижим с точки зрения синтаксиса, но недостижим с точки зрения семантики, поскольку типом переменной `а`
23
+ * всегда является `Объект`.
24
+ */
25
+ isControlFlowNodeReachable(node: controlFlow.Node): boolean;
26
+ private isConditionReachable;
27
+ }
@@ -0,0 +1,20 @@
1
+ import { DiagnosticAcceptor } from '../diagnostic/Diagnostic.js';
2
+ import * as tree from '../tree/index.js';
3
+ import * as types from '../types/index.js';
4
+ import { Analyzer } from './Analyzer.js';
5
+ import { TypeMemberLookupContext } from './TypeMemberLookup.js';
6
+ export declare class ReductionSourceMemberFinder {
7
+ private static signatureComparisonOptions_;
8
+ private static get signatureComparisonOptions();
9
+ private readonly analyzer;
10
+ constructor(analyzer: Analyzer);
11
+ findField(member: types.Field, reductionSource: types.Type, lookupContext: TypeMemberLookupContext, diagnostics: DiagnosticAcceptor, nodeForDiagnostic: tree.Node): types.Field | undefined;
12
+ findMethod(member: types.Method, reductionSource: types.Type, lookupContext: TypeMemberLookupContext, diagnostics: DiagnosticAcceptor, nodeForDiagnostic: tree.Node): types.Method | undefined;
13
+ findOperator(member: types.Operator, reductionSource: types.Type, lookupContext: TypeMemberLookupContext, diagnostics: DiagnosticAcceptor, nodeForDiagnostic: tree.Node): types.Operator | undefined;
14
+ findConstructor(member: types.Constructor, reductionSource: types.Type, lookupContext: TypeMemberLookupContext, diagnostics: DiagnosticAcceptor, nodeForDiagnostic: tree.Node): types.Constructor | undefined;
15
+ findDestructor(member: types.Destructor, reductionSource: types.Type, lookupContext: TypeMemberLookupContext, diagnostics: DiagnosticAcceptor, nodeForDiagnostic: tree.Node): types.Destructor | undefined;
16
+ findIndexer(member: types.Indexer, reductionSource: types.Type, lookupContext: TypeMemberLookupContext, diagnostics: DiagnosticAcceptor, nodeForDiagnostic: tree.Node): types.Indexer | undefined;
17
+ findDereferenceOperator(member: types.DereferenceOperator, reductionSource: types.Type, lookupContext: TypeMemberLookupContext, diagnostics: DiagnosticAcceptor, nodeForDiagnostic: tree.Node): types.DereferenceOperator | undefined;
18
+ private getTypeMemberLookupOptions;
19
+ private checkMembersHaveSameHiding;
20
+ }
@@ -0,0 +1,14 @@
1
+ import { Lazy, Name, PackageLocale } from '../common/index.js';
2
+ export declare const enum ReservedNameKind {
3
+ Result = 0,
4
+ Value = 1
5
+ }
6
+ export declare const reservedNamesByLocale: Lazy<{
7
+ [T in PackageLocale]: {
8
+ [T in ReservedNameKind]: Name;
9
+ };
10
+ }>;
11
+ export declare const reservedNameKindByNameKey: Lazy<{
12
+ 0: ReadonlyMap<string, ReservedNameKind>;
13
+ 1: ReadonlyMap<string, ReservedNameKind>;
14
+ }>;
@@ -20,6 +20,9 @@ export declare class SourceFileAnalyzer {
20
20
  constructor(analyzer: Analyzer, sourceFile: project.SourceFile);
21
21
  analyze(taskController: TaskController): Promise<Diagnostic[]>;
22
22
  private analyzeNode;
23
+ private checkErrorStatement;
24
+ private checkBreakLoopOrContinueLoopStatement;
25
+ private isStatementUsedInsideLoop;
23
26
  private checkTypeParameterList;
24
27
  private checkTypeParameterDeclaration;
25
28
  private checkFunctionLiteral;
@@ -36,6 +36,7 @@ export declare class TypeArgumentInferrer {
36
36
  private inferFromTypes;
37
37
  private inferToParameterType;
38
38
  private inferToStructuredType;
39
+ private inferToReducedType;
39
40
  private inferFromSubstitutions;
40
41
  private inferToUnionType;
41
42
  private inferFromFunctionTypes;
@@ -1,34 +1,33 @@
1
1
  import { Name, PackageLocale } from '../common/index.js';
2
- import { IEntityHidingMatcher, OperatorKind, TypeEntity, TypeExtensionEntity, TypeOrExtensionEntity } from '../entities/index.js';
2
+ import { OperatorKind, PackageEntity, TypeEntity, TypeExtensionEntity, TypeOrExtensionEntity } from '../entities/index.js';
3
+ import { SourceFile } from '../project/SourceFile.js';
3
4
  import * as types from '../types/index.js';
4
5
  import { Analyzer } from './Analyzer.js';
5
6
  import { SemanticContext } from './semantic-context/SemanticContext.js';
6
7
  export declare class TypeMemberLookup {
7
8
  private readonly analyzer;
8
9
  private readonly typeOrExtension;
9
- private readonly contextLocale;
10
10
  private constructor();
11
- static ofType(analyzer: Analyzer, type: types.Type, contextLocale: PackageLocale | undefined): TypeMemberLookup;
12
- static ofTypeEntity(analyzer: Analyzer, entity: TypeEntity, contextLocale: PackageLocale | undefined): TypeMemberLookup;
13
- static ofTypeExtension(analyzer: Analyzer, typeExtension: TypeExtensionEntity, contextLocale: PackageLocale | undefined): TypeMemberLookup;
14
- static ofTypeOrExtension(analyzer: Analyzer, typeOrExtension: TypeOrExtension, contextLocale: PackageLocale | undefined): TypeMemberLookup;
15
- getNamedMembers(options?: TypeMemberLookupOptions, hidingMatcher?: IEntityHidingMatcher, typeExtensionLookup?: SemanticContext): readonly types.NamedTypeMember[];
16
- getNamedMembersByName(name: Name, options?: TypeMemberLookupOptions, hidingMatcher?: IEntityHidingMatcher, typeExtensionLookup?: SemanticContext): readonly types.NamedTypeMember[];
17
- getOperators(options?: TypeMemberLookupOptions, hidingMatcher?: IEntityHidingMatcher, typeExtensionLookup?: SemanticContext): readonly types.Operator[];
18
- getOperatorsByKind(kind: OperatorKind, options?: TypeMemberLookupOptions, hidingMatcher?: IEntityHidingMatcher, typeExtensionLookup?: SemanticContext): readonly types.Operator[];
19
- getConstructors(hidingMatcher?: IEntityHidingMatcher, typeExtensionLookup?: SemanticContext): readonly types.Constructor[];
20
- getIndexers(options?: TypeMemberLookupOptions, hidingMatcher?: IEntityHidingMatcher, typeExtensionLookup?: SemanticContext): readonly types.Indexer[];
21
- getDereferenceOperators(options?: TypeMemberLookupOptions, hidingMatcher?: IEntityHidingMatcher, typeExtensionLookup?: SemanticContext): readonly types.DereferenceOperator[];
11
+ static ofType(analyzer: Analyzer, type: types.Type): TypeMemberLookup;
12
+ static ofTypeEntity(analyzer: Analyzer, entity: TypeEntity): TypeMemberLookup;
13
+ static ofTypeExtension(analyzer: Analyzer, typeExtension: TypeExtensionEntity): TypeMemberLookup;
14
+ static ofTypeOrExtension(analyzer: Analyzer, typeOrExtension: TypeOrExtension): TypeMemberLookup;
15
+ getNamedMembers(context: TypeMemberLookupContext | undefined, options?: TypeMemberLookupOptions): readonly types.NamedTypeMember[];
16
+ getNamedMembersByName(name: Name, context: TypeMemberLookupContext | undefined, options?: TypeMemberLookupOptions): readonly types.NamedTypeMember[];
17
+ getOperators(context: TypeMemberLookupContext | undefined, options?: TypeMemberLookupOptions): readonly types.Operator[];
18
+ getOperatorsByKind(kind: OperatorKind, context: TypeMemberLookupContext | undefined, options?: TypeMemberLookupOptions): readonly types.Operator[];
19
+ getConstructors(context: TypeMemberLookupContext | undefined, options?: TypeMemberLookupOptions): readonly types.Constructor[];
20
+ getIndexers(context: TypeMemberLookupContext | undefined, options?: TypeMemberLookupOptions): readonly types.Indexer[];
21
+ getDereferenceOperators(context: TypeMemberLookupContext | undefined, options?: TypeMemberLookupOptions): readonly types.DereferenceOperator[];
22
22
  }
23
23
  export declare class BoundTypeMemberLookup {
24
24
  private readonly lookup;
25
25
  private readonly options;
26
- private readonly hidingMatcher;
27
- private readonly typeExtensionLookup;
26
+ private readonly context;
28
27
  private constructor();
29
- static ofType(analyzer: Analyzer, type: types.Type, contextLocale: PackageLocale | undefined, options: TypeMemberLookupOptions | undefined, hidingMatcher: IEntityHidingMatcher | undefined, typeExtensionLookup: SemanticContext | undefined): BoundTypeMemberLookup;
30
- static ofTypeEntity(analyzer: Analyzer, entity: TypeEntity, contextLocale: PackageLocale | undefined, options: TypeMemberLookupOptions | undefined, hidingMatcher: IEntityHidingMatcher | undefined, typeExtensionLookup: SemanticContext | undefined): BoundTypeMemberLookup;
31
- static ofTypeExtension(analyzer: Analyzer, typeExtension: TypeExtensionEntity, contextLocale: PackageLocale | undefined, options: TypeMemberLookupOptions | undefined, hidingMatcher: IEntityHidingMatcher | undefined, typeExtensionLookup: SemanticContext | undefined): BoundTypeMemberLookup;
28
+ static ofType(analyzer: Analyzer, type: types.Type, context: TypeMemberLookupContext | undefined, options: TypeMemberLookupOptions): BoundTypeMemberLookup;
29
+ static ofTypeEntity(analyzer: Analyzer, entity: TypeEntity, context: TypeMemberLookupContext | undefined, options: TypeMemberLookupOptions): BoundTypeMemberLookup;
30
+ static ofTypeExtension(analyzer: Analyzer, typeExtension: TypeExtensionEntity, context: TypeMemberLookupContext | undefined, options: TypeMemberLookupOptions): BoundTypeMemberLookup;
32
31
  getNamedMembers(): readonly types.NamedTypeMember[];
33
32
  getNamedMembersByName(name: Name): readonly types.NamedTypeMember[];
34
33
  getOperators(): readonly types.Operator[];
@@ -37,25 +36,40 @@ export declare class BoundTypeMemberLookup {
37
36
  getIndexers(): readonly types.Indexer[];
38
37
  getDereferenceOperators(): readonly types.DereferenceOperator[];
39
38
  }
39
+ export declare class TypeMemberLookupContext {
40
+ readonly typeOrExtensionEntity: TypeOrExtensionEntity | undefined;
41
+ readonly sourceFile: SourceFile | undefined;
42
+ readonly packageEntity: PackageEntity | undefined;
43
+ readonly locale: PackageLocale | undefined;
44
+ readonly typeExtensionLookup: SemanticContext | undefined;
45
+ constructor(typeOrExtensionEntity: TypeOrExtensionEntity | undefined, sourceFile: SourceFile | undefined, packageEntity: PackageEntity | undefined, locale: PackageLocale | undefined, typeExtensionLookup: SemanticContext | undefined);
46
+ affectsAccessibility(): boolean;
47
+ }
40
48
  export declare enum TypeMemberLookupOptions {
41
49
  None = 0,
42
50
  OnlyInstanceMembers = 1,
43
- OnlyStaticMembers = 2
51
+ OnlyStaticMembers = 2,
52
+ NoTypeExtensionMembers = 4,
53
+ /**
54
+ * Смотрите метод {@link AccessibilityCheck.isTypeMemberAccessible}.
55
+ */
56
+ CheckAccessibilityIgnoringReceiverType = 8,
57
+ OnlyInstanceOrOnlyStaticMembers = 3
44
58
  }
45
59
  type TypeOrExtension = TypeOrExtension_type | TypeOrExtension_extension;
46
60
  declare class TypeOrExtension_type implements ITypeOrExtension {
47
61
  readonly value: types.Type;
48
62
  readonly kind = "type";
49
63
  constructor(value: types.Type);
50
- getEntity(): TypeOrExtensionEntity | undefined;
64
+ getType(): types.Type | undefined;
51
65
  }
52
66
  declare class TypeOrExtension_extension implements ITypeOrExtension {
53
67
  readonly value: TypeExtensionEntity;
54
68
  readonly kind = "extension";
55
69
  constructor(value: TypeExtensionEntity);
56
- getEntity(): TypeOrExtensionEntity | undefined;
70
+ getType(): types.Type | undefined;
57
71
  }
58
72
  interface ITypeOrExtension {
59
- getEntity(): TypeOrExtensionEntity | undefined;
73
+ getType(): types.Type | undefined;
60
74
  }
61
75
  export {};
@@ -11,6 +11,8 @@ export declare function getParentGenericSpecializationExpression(expression: tre
11
11
  export declare function getGenericSpecializationExpressionOfCallee(callee: tree.Expression): tree.GenericSpecializationExpression | undefined;
12
12
  export declare function unaliasType(type: types.Type): types.Type;
13
13
  export declare function unaliasType(type: types.Type | undefined): types.Type | undefined;
14
+ export declare function unaliasTypeAndGetReductionSource(type: types.Type): types.Type;
15
+ export declare function unaliasTypeAndGetReductionSource(type: types.Type | undefined): types.Type | undefined;
14
16
  export declare function findTag(tagTypeEntity: TypeEntity, tags: readonly Tag[]): TagType | undefined;
15
17
  export declare function findTag(tagFunctionEntity: FunctionEntity, tags: readonly Tag[]): TagFunction | undefined;
16
18
  export declare function findTag(tagEntity: TypeEntity | FunctionEntity, tags: readonly Tag[]): TagType | TagFunction | undefined;
@@ -1,6 +1,6 @@
1
1
  import { PackageLocale } from '../common/PackageLocale.js';
2
2
  import { Diagnostic } from '../diagnostic/Diagnostic.js';
3
- import { AliasTypeEntity, MethodEntity, StructuredTypeEntity } from '../entities/index.js';
3
+ import { AliasTypeEntity, MethodEntity, ReducedTypeEntity, StructuredTypeEntity } from '../entities/index.js';
4
4
  import { Analyzer } from './Analyzer.js';
5
5
  export declare class WellKnownDeclarationsLoadError extends Error {
6
6
  readonly diagnostic: Diagnostic;
@@ -20,17 +20,18 @@ export interface WellKnownDeclarations {
20
20
  readonly enumerator: StructuredTypeEntity;
21
21
  readonly enumeratorMethod: MethodEntity;
22
22
  readonly array: StructuredTypeEntity;
23
- readonly readonlyArray: StructuredTypeEntity;
23
+ readonly readonlyArray: ReducedTypeEntity;
24
24
  readonly map: StructuredTypeEntity;
25
- readonly readonlyMap: StructuredTypeEntity;
25
+ readonly readonlyMap: ReducedTypeEntity;
26
26
  readonly set: StructuredTypeEntity;
27
- readonly readonlySet: StructuredTypeEntity;
27
+ readonly readonlySet: ReducedTypeEntity;
28
28
  readonly measure: StructuredTypeEntity;
29
29
  readonly reference: StructuredTypeEntity;
30
30
  readonly task: StructuredTypeEntity;
31
31
  readonly error: StructuredTypeEntity;
32
32
  readonly func: StructuredTypeEntity;
33
33
  readonly parameterArray: AliasTypeEntity;
34
+ readonly impossibleCase: StructuredTypeEntity;
34
35
  readonly defaultImport: StructuredTypeEntity;
35
36
  readonly realName: StructuredTypeEntity;
36
37
  readonly builtIntoPlatform: StructuredTypeEntity;
@@ -64,6 +65,7 @@ export declare class LocalizedWellKnownDeclarations implements WellKnownDeclarat
64
65
  private error_;
65
66
  private func_;
66
67
  private parameterArray_;
68
+ private impossibleCase_;
67
69
  private defaultImport_;
68
70
  private realName_;
69
71
  private builtIntoPlatform_;
@@ -83,23 +85,25 @@ export declare class LocalizedWellKnownDeclarations implements WellKnownDeclarat
83
85
  get enumerator(): StructuredTypeEntity;
84
86
  get enumeratorMethod(): MethodEntity;
85
87
  get array(): StructuredTypeEntity;
86
- get readonlyArray(): StructuredTypeEntity;
88
+ get readonlyArray(): ReducedTypeEntity;
87
89
  get map(): StructuredTypeEntity;
88
- get readonlyMap(): StructuredTypeEntity;
90
+ get readonlyMap(): ReducedTypeEntity;
89
91
  get set(): StructuredTypeEntity;
90
- get readonlySet(): StructuredTypeEntity;
92
+ get readonlySet(): ReducedTypeEntity;
91
93
  get measure(): StructuredTypeEntity;
92
94
  get reference(): StructuredTypeEntity;
93
95
  get task(): StructuredTypeEntity;
94
96
  get error(): StructuredTypeEntity;
95
97
  get func(): StructuredTypeEntity;
96
98
  get parameterArray(): AliasTypeEntity;
99
+ get impossibleCase(): StructuredTypeEntity;
97
100
  get defaultImport(): StructuredTypeEntity;
98
101
  get realName(): StructuredTypeEntity;
99
102
  get builtIntoPlatform(): StructuredTypeEntity;
100
103
  get fieldProxy(): StructuredTypeEntity;
101
104
  get javaScriptDecorator(): StructuredTypeEntity;
102
105
  private getLocalizedStructuredType;
106
+ private getLocalizedReducedType;
103
107
  private getLocalizedAliasType;
104
108
  private getLocalizedMethod;
105
109
  private getLocalizationContext;
@@ -1,11 +1,13 @@
1
1
  import { Diagnostic } from '../../diagnostic/Diagnostic.js';
2
2
  import { SourceFile } from '../../project/SourceFile.js';
3
+ import * as tree from '../../tree/index.js';
3
4
  import { SubprogramDeclarationOrLiteral } from '../NodeTypeUtils.js';
4
5
  import { NarrowableReferenceExpression } from './NarrowableExpression.js';
5
6
  import { Node } from './Nodes.js';
6
7
  export declare class GraphBuilder {
7
8
  private readonly sourceFile;
8
9
  private readonly controlFlowNodeByReference;
10
+ private readonly controlFlowNodesPrecedingErrorStatement;
9
11
  private readonly controlFlowNodesEndingSubprogram;
10
12
  private readonly unreachableCodeDiagnostics;
11
13
  private isInRebuildingFinallyClauseGraphMode;
@@ -41,7 +43,8 @@ export declare class GraphBuilder {
41
43
  }
42
44
  export declare class GraphBuildResult {
43
45
  readonly controlFlowNodeByReference: ReadonlyMap<NarrowableReferenceExpression, Node>;
46
+ readonly controlFlowNodesPrecedingErrorStatement: ReadonlyMap<tree.ErrorStatement, Node>;
44
47
  readonly controlFlowNodesEndingSubprogram: ReadonlyMap<SubprogramDeclarationOrLiteral, Node>;
45
48
  readonly unreachableCodeDiagnostics: readonly Diagnostic[];
46
- constructor(controlFlowNodeByReference: ReadonlyMap<NarrowableReferenceExpression, Node>, controlFlowNodesEndingSubprogram: ReadonlyMap<SubprogramDeclarationOrLiteral, Node>, unreachableCodeDiagnostics: readonly Diagnostic[]);
49
+ constructor(controlFlowNodeByReference: ReadonlyMap<NarrowableReferenceExpression, Node>, controlFlowNodesPrecedingErrorStatement: ReadonlyMap<tree.ErrorStatement, Node>, controlFlowNodesEndingSubprogram: ReadonlyMap<SubprogramDeclarationOrLiteral, Node>, unreachableCodeDiagnostics: readonly Diagnostic[]);
47
50
  }
@@ -1,6 +1,7 @@
1
1
  import { Name } from '../../common/index.js';
2
2
  import * as tree from '../../tree/index.js';
3
3
  import { Analyzer } from '../Analyzer.js';
4
+ import { TypeMemberLookupContext } from '../TypeMemberLookup.js';
4
5
  import { NamedDeclaration, TypeOrContainerWithTypes } from './Declarations.js';
5
6
  import { SemanticContext } from './SemanticContext.js';
6
7
  import { SemanticContextWithParent } from './SemanticContextWithParent.js';
@@ -13,8 +14,9 @@ export declare class FieldWithInitializerSemanticContext extends SemanticContext
13
14
  private readonly node;
14
15
  constructor(analyzer: Analyzer, node: tree.FieldDeclaration, outer: SemanticContextContainingTypeMember);
15
16
  isStatic(): boolean;
17
+ getTypeMemberLookupContext(): TypeMemberLookupContext;
16
18
  getOwnTypesOrContainersWithTypes(_initialContext: SemanticContext): readonly TypeOrContainerWithTypes[];
17
19
  getOwnTypesOrContainersWithTypesByName(_name: Name, _initialContext: SemanticContext): readonly TypeOrContainerWithTypes[];
18
- getOwnNamedDeclarations(_initialContext: SemanticContext, _noInstanceMembers?: boolean): readonly NamedDeclaration[];
19
- getOwnNamedDeclarationsByName(_name: Name, _initialContext: SemanticContext, _noInstanceMembers?: boolean): readonly NamedDeclaration[];
20
+ getOwnNamedDeclarations(_initialContext: SemanticContext, _noInstanceMembers: boolean): readonly NamedDeclaration[];
21
+ getOwnNamedDeclarationsByName(_name: Name, _initialContext: SemanticContext, _noInstanceMembers: boolean): readonly NamedDeclaration[];
20
22
  }