@artel/artc 0.9.26025-pre-release → 0.9.26026-pre-release

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.
package/build/Cli.js CHANGED
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CommandLineCompiler
4
- } from "./chunk-3ZZBPFOL.js";
5
- import "./chunk-2WJO6BHA.js";
4
+ } from "./chunk-OTUGMPBD.js";
5
+ import "./chunk-JXT5ZWQJ.js";
6
6
  import {
7
7
  __async
8
- } from "./chunk-SI24BVXL.js";
8
+ } from "./chunk-XMSHAJ5M.js";
9
9
 
10
10
  // source/Cli.ts
11
11
  function main() {
package/build/api/Api.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Compiler
3
- } from "../chunk-2WJO6BHA.js";
3
+ } from "../chunk-JXT5ZWQJ.js";
4
4
  import {
5
5
  AccessKind,
6
6
  AccessedFunction_entity,
@@ -310,7 +310,7 @@ import {
310
310
  withoutQuotes,
311
311
  withoutTemplateQuotes,
312
312
  yieldTask
313
- } from "../chunk-SI24BVXL.js";
313
+ } from "../chunk-XMSHAJ5M.js";
314
314
  export {
315
315
  AccessKind,
316
316
  AccessedFunction_entity,
@@ -6,9 +6,9 @@ import {
6
6
  PhysicalFileSystem,
7
7
  PhysicalTypeScriptLibrariesProvider,
8
8
  PrintingDiagnosticAcceptor
9
- } from "../chunk-3ZZBPFOL.js";
10
- import "../chunk-2WJO6BHA.js";
11
- import "../chunk-SI24BVXL.js";
9
+ } from "../chunk-OTUGMPBD.js";
10
+ import "../chunk-JXT5ZWQJ.js";
11
+ import "../chunk-XMSHAJ5M.js";
12
12
  export {
13
13
  CommandLineCompiler,
14
14
  FileSystemUri,
@@ -139,7 +139,7 @@ import {
139
139
  traverseTreeAsync,
140
140
  traverseTreeAsync2,
141
141
  yieldTask
142
- } from "../chunk-SI24BVXL.js";
142
+ } from "../chunk-XMSHAJ5M.js";
143
143
 
144
144
  // source/services/common/Types.ts
145
145
  import * as ls from "vscode-languageserver";
@@ -9,7 +9,7 @@ import {
9
9
  WellKnownDeclarationsLoadError,
10
10
  __async,
11
11
  createTsInteropInputsForCompilation
12
- } from "./chunk-SI24BVXL.js";
12
+ } from "./chunk-XMSHAJ5M.js";
13
13
 
14
14
  // source/executor/Compiler.ts
15
15
  var Compiler = class {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Compiler
3
- } from "./chunk-2WJO6BHA.js";
3
+ } from "./chunk-JXT5ZWQJ.js";
4
4
  import {
5
5
  ArtelVersion,
6
6
  Cached,
@@ -16,7 +16,7 @@ import {
16
16
  __async,
17
17
  performanceMeasurementStageNames,
18
18
  performanceMeasurementStages
19
- } from "./chunk-SI24BVXL.js";
19
+ } from "./chunk-XMSHAJ5M.js";
20
20
 
21
21
  // source/executor/FileSystemUri.ts
22
22
  import { platform } from "os";
@@ -780,7 +780,7 @@ var UniqueWithComparatorQuery = class extends Query {
780
780
  };
781
781
 
782
782
  // source/common/Constants.ts
783
- var ArtelVersion = true ? "0.9.26025-pre-release" : "";
783
+ var ArtelVersion = true ? "0.9.26026-pre-release" : "";
784
784
  var ArtelSourceFileExtensions = [".\u0430\u0440\u0442", ".\u0430\u0440\u0442\u0435\u043B\u044C", ".art", ".artel", ".\u0430\u0440\u0442\u043C", ".\u0430\u0440\u0442\u0435\u043B\u044C\u043C", ".artm", ".artelm"];
785
785
  var ArtelSourceFileExtensionSet = new Set(ArtelSourceFileExtensions);
786
786
  var ArtelSourceAndConfigurationFileExtensionSet = new Set(ArtelSourceFileExtensionSet).add(".json");
@@ -61769,6 +61769,7 @@ var TypeMemberLookupOptions = /* @__PURE__ */ ((TypeMemberLookupOptions2) => {
61769
61769
  TypeMemberLookupOptions2[TypeMemberLookupOptions2["NoTypeExtensionMembers"] = 4] = "NoTypeExtensionMembers";
61770
61770
  TypeMemberLookupOptions2[TypeMemberLookupOptions2["CheckAccessibilityIgnoringReceiverType"] = 8] = "CheckAccessibilityIgnoringReceiverType";
61771
61771
  TypeMemberLookupOptions2[TypeMemberLookupOptions2["NoBaseTypeMembers"] = 16] = "NoBaseTypeMembers";
61772
+ TypeMemberLookupOptions2[TypeMemberLookupOptions2["DoNotContinueSearchInObjectTypeAfterSearchInAspectType"] = 32] = "DoNotContinueSearchInObjectTypeAfterSearchInAspectType";
61772
61773
  TypeMemberLookupOptions2[TypeMemberLookupOptions2["OnlyInstanceOrOnlyStaticMembers"] = 3] = "OnlyInstanceOrOnlyStaticMembers";
61773
61774
  TypeMemberLookupOptions2[TypeMemberLookupOptions2["NoBaseTypeAndExtensionMembers"] = 20] = "NoBaseTypeAndExtensionMembers";
61774
61775
  return TypeMemberLookupOptions2;
@@ -61904,7 +61905,7 @@ var TypeMemberLookupBase = class {
61904
61905
  getAllMembersOfTypeComplete(type, options) {
61905
61906
  const state = new TypeMemberLookupState();
61906
61907
  const result = this.getAllMembersOfType(type, options, state);
61907
- if (state.searchedInAspect && !state.searchedInStandardObjectType) {
61908
+ if (state.searchedInAspect && !state.searchedInStandardObjectType && (options & 32 /* DoNotContinueSearchInObjectTypeAfterSearchInAspectType */) === 0) {
61908
61909
  const locale = this.tryGetTypeLocale(type) ?? this.context?.locale ?? DefaultLocale;
61909
61910
  const objectTypeMembers = this.getAllMembersOfType(
61910
61911
  this.analyzer.getLocalizedStandardTypes(locale).object,
@@ -62121,7 +62122,7 @@ var TypeMemberLookupByKeyBase = class extends TypeMemberLookupBase {
62121
62122
  getMembersOfTypeByKeyComplete(key, type, options) {
62122
62123
  const state = new TypeMemberLookupState();
62123
62124
  const result = this.getMembersOfTypeByKey(key, type, options, state);
62124
- if (state.searchedInAspect && !state.searchedInStandardObjectType) {
62125
+ if (state.searchedInAspect && !state.searchedInStandardObjectType && (options & 32 /* DoNotContinueSearchInObjectTypeAfterSearchInAspectType */) === 0) {
62125
62126
  const locale = this.tryGetTypeLocale(type) ?? this.context?.locale ?? DefaultLocale;
62126
62127
  const objectTypeMembers = this.getMembersOfTypeByKey(
62127
62128
  key,
@@ -65530,8 +65531,13 @@ function isNarrowableExpression(node) {
65530
65531
  case 83 /* IdentifierExpression */:
65531
65532
  case 81 /* ObjectExpression */:
65532
65533
  return true;
65533
- case 70 /* MemberAccessExpression */:
65534
- return isNarrowableExpression(node.expression);
65534
+ case 70 /* MemberAccessExpression */: {
65535
+ let expression = node.expression;
65536
+ if (expression.kind === 84 /* GenericSpecializationExpression */) {
65537
+ expression = expression.expression;
65538
+ }
65539
+ return isNarrowableExpression(expression);
65540
+ }
65535
65541
  case 55 /* AssertionExpression */:
65536
65542
  return isNarrowableExpression(node.expression);
65537
65543
  case 56 /* AssumptionExpression */:
@@ -65547,8 +65553,13 @@ function isNarrowableReferenceExpression(node) {
65547
65553
  case 83 /* IdentifierExpression */:
65548
65554
  case 81 /* ObjectExpression */:
65549
65555
  return true;
65550
- case 70 /* MemberAccessExpression */:
65551
- return isNarrowableExpression(node.expression);
65556
+ case 70 /* MemberAccessExpression */: {
65557
+ let expression = node.expression;
65558
+ if (expression.kind === 84 /* GenericSpecializationExpression */) {
65559
+ expression = expression.expression;
65560
+ }
65561
+ return isNarrowableExpression(expression);
65562
+ }
65552
65563
  default:
65553
65564
  return false;
65554
65565
  }
@@ -79091,8 +79102,13 @@ function isNarrowableExpression2(node) {
79091
79102
  case 1041 /* IdentifierExpression */:
79092
79103
  case 1073 /* ObjectExpression */:
79093
79104
  return true;
79094
- case 1061 /* MemberAccessExpression */:
79095
- return isNarrowableExpression2(node.expression);
79105
+ case 1061 /* MemberAccessExpression */: {
79106
+ let expression = node.expression;
79107
+ if (expression.kind === 1040 /* GenericSpecializationExpression */) {
79108
+ expression = expression.expression;
79109
+ }
79110
+ return isNarrowableExpression2(expression);
79111
+ }
79096
79112
  case 1008 /* AssumptionExpression */:
79097
79113
  return isNarrowableExpression2(node.expression);
79098
79114
  case 1093 /* ParenthesizedExpression */:
@@ -79106,8 +79122,13 @@ function isNarrowableReferenceExpression2(node) {
79106
79122
  case 1041 /* IdentifierExpression */:
79107
79123
  case 1073 /* ObjectExpression */:
79108
79124
  return true;
79109
- case 1061 /* MemberAccessExpression */:
79110
- return isNarrowableExpression2(node.expression);
79125
+ case 1061 /* MemberAccessExpression */: {
79126
+ let expression = node.expression;
79127
+ if (expression.kind === 1040 /* GenericSpecializationExpression */) {
79128
+ expression = expression.expression;
79129
+ }
79130
+ return isNarrowableExpression2(expression);
79131
+ }
79111
79132
  default:
79112
79133
  return false;
79113
79134
  }
@@ -85204,7 +85225,7 @@ var OverriddenMember = class _OverriddenMember {
85204
85225
  this.analyzer,
85205
85226
  type,
85206
85227
  typeMemberLookupContext,
85207
- 1 /* OnlyInstanceMembers */ | 8 /* CheckAccessibilityIgnoringReceiverType */
85228
+ 1 /* OnlyInstanceMembers */ | 8 /* CheckAccessibilityIgnoringReceiverType */ | 32 /* DoNotContinueSearchInObjectTypeAfterSearchInAspectType */
85208
85229
  );
85209
85230
  }
85210
85231
  }
@@ -93819,18 +93840,15 @@ var SourcePackageMemberConflictsValidator = class {
93819
93840
 
93820
93841
  // source/analysis/ArgumentsToParametersMatcher.ts
93821
93842
  var ArgumentToParameterMatcher = class {
93822
- constructor(analyzer, signature, arguments_, diagnostics, unmatchedRequiredParametersDiagnosticLocation) {
93843
+ constructor(analyzer, parameters, arguments_, diagnostics, unmatchedRequiredParametersDiagnosticLocation) {
93823
93844
  this.analyzer = analyzer;
93824
- this.signature = signature;
93845
+ this.parameters = parameters;
93825
93846
  this.arguments_ = arguments_;
93826
93847
  this.diagnostics = diagnostics;
93827
93848
  this.unmatchedRequiredParametersDiagnosticLocation = unmatchedRequiredParametersDiagnosticLocation;
93828
93849
  }
93829
93850
  match() {
93830
- const originalSignatureMathResult = this.matchArgumentsToParameters(
93831
- this.arguments_,
93832
- this.signature.getParameters()
93833
- );
93851
+ const originalSignatureMathResult = this.matchArgumentsToParameters(this.arguments_, this.parameters);
93834
93852
  return originalSignatureMathResult;
93835
93853
  }
93836
93854
  matchArgumentsToParameters(args, parameters) {
@@ -93948,27 +93966,45 @@ var ArgumentToParameterMatchResult = class {
93948
93966
  switch (meaning.kind) {
93949
93967
  case "function-call": {
93950
93968
  if (meaning.suitableOrSingleFunction !== void 0) {
93951
- const signature = new FunctionMatcherSignature(meaning.suitableOrSingleFunction);
93969
+ const parameters = meaning.suitableOrSingleFunction.getParameters().map((p) => new Parameter2(p.entity, p.type));
93952
93970
  const args = node.argumentList.arguments.map((a) => new SourceMatcherArgument(this.analyzer, a)).toArray();
93953
- const matcher_ = new ArgumentToParameterMatcher(this.analyzer, signature, args, void 0, void 0);
93971
+ const matcher_ = new ArgumentToParameterMatcher(
93972
+ this.analyzer,
93973
+ parameters,
93974
+ args,
93975
+ void 0,
93976
+ void 0
93977
+ );
93954
93978
  const matchResult = matcher_.match();
93955
93979
  result = this.convertMatchResult(matchResult);
93956
93980
  }
93957
93981
  break;
93958
93982
  }
93959
93983
  case "object-function-call": {
93960
- const signature = new FunctionTypeMatcherSignature(this.analyzer, meaning.type);
93984
+ const parameters = meaning.type.getParameters().map((p) => new Parameter2(p.entity, p.getType()));
93961
93985
  const args = node.argumentList.arguments.map((a) => new SourceMatcherArgument(this.analyzer, a)).toArray();
93962
- const matcher_ = new ArgumentToParameterMatcher(this.analyzer, signature, args, void 0, void 0);
93986
+ const matcher_ = new ArgumentToParameterMatcher(
93987
+ this.analyzer,
93988
+ parameters,
93989
+ args,
93990
+ void 0,
93991
+ void 0
93992
+ );
93963
93993
  const matchResult = matcher_.match();
93964
93994
  result = this.convertMatchResult(matchResult);
93965
93995
  break;
93966
93996
  }
93967
93997
  case "constructor-call":
93968
93998
  if (meaning.suitableOrSingleConstructor !== void 0) {
93969
- const signature = new MatcherConstructorSignature(meaning.suitableOrSingleConstructor);
93999
+ const parameters = meaning.suitableOrSingleConstructor.getParameters().map((p) => new Parameter2(p.entity, p.getType()));
93970
94000
  const args = node.argumentList.arguments.map((a) => new SourceMatcherArgument(this.analyzer, a)).toArray();
93971
- const matcher_ = new ArgumentToParameterMatcher(this.analyzer, signature, args, void 0, void 0);
94001
+ const matcher_ = new ArgumentToParameterMatcher(
94002
+ this.analyzer,
94003
+ parameters,
94004
+ args,
94005
+ void 0,
94006
+ void 0
94007
+ );
93972
94008
  const matchResult = matcher_.match();
93973
94009
  result = this.convertMatchResult(matchResult);
93974
94010
  }
@@ -93993,9 +94029,15 @@ var ArgumentToParameterMatchResult = class {
93993
94029
  switch (meaning.kind) {
93994
94030
  case "tag-type": {
93995
94031
  if (meaning.suitableOrSingleConstructor !== void 0) {
93996
- const signature = new MatcherConstructorSignature(meaning.suitableOrSingleConstructor);
94032
+ const parameters = meaning.suitableOrSingleConstructor.getParameters().map((p) => new Parameter2(p.entity, p.getType()));
93997
94033
  const args = node.argumentList?.arguments.map((a) => new SourceMatcherArgument(this.analyzer, a)).toArray() ?? [];
93998
- const matcher_ = new ArgumentToParameterMatcher(this.analyzer, signature, args, void 0, void 0);
94034
+ const matcher_ = new ArgumentToParameterMatcher(
94035
+ this.analyzer,
94036
+ parameters,
94037
+ args,
94038
+ void 0,
94039
+ void 0
94040
+ );
93999
94041
  const matchResult = matcher_.match();
94000
94042
  result = this.convertMatchResult(matchResult);
94001
94043
  }
@@ -94003,9 +94045,15 @@ var ArgumentToParameterMatchResult = class {
94003
94045
  }
94004
94046
  case "tag-function": {
94005
94047
  if (meaning.suitableOrSingleFunction !== void 0) {
94006
- const signature = new FunctionMatcherSignature(meaning.suitableOrSingleFunction);
94048
+ const parameters = meaning.suitableOrSingleFunction.getParameters().map((p) => new Parameter2(p.entity, p.type));
94007
94049
  const args = node.argumentList?.arguments.map((a) => new SourceMatcherArgument(this.analyzer, a)).toArray() ?? [];
94008
- const matcher_ = new ArgumentToParameterMatcher(this.analyzer, signature, args, void 0, void 0);
94050
+ const matcher_ = new ArgumentToParameterMatcher(
94051
+ this.analyzer,
94052
+ parameters,
94053
+ args,
94054
+ void 0,
94055
+ void 0
94056
+ );
94009
94057
  const matchResult = matcher_.match();
94010
94058
  result = this.convertMatchResult(matchResult);
94011
94059
  break;
@@ -94030,9 +94078,15 @@ var ArgumentToParameterMatchResult = class {
94030
94078
  switch (meaning.kind) {
94031
94079
  case "resolved": {
94032
94080
  if (meaning.singleIndexer !== void 0) {
94033
- const signature = new MatcherIndexerSignature(meaning.singleIndexer);
94081
+ const parameters = meaning.singleIndexer.getParameters().map((p) => new Parameter2(p.entity, p.getType()));
94034
94082
  const args = node.argumentList?.arguments.map((a) => new SourceMatcherArgument(this.analyzer, a)).toArray() ?? [];
94035
- const matcher_ = new ArgumentToParameterMatcher(this.analyzer, signature, args, void 0, void 0);
94083
+ const matcher_ = new ArgumentToParameterMatcher(
94084
+ this.analyzer,
94085
+ parameters,
94086
+ args,
94087
+ void 0,
94088
+ void 0
94089
+ );
94036
94090
  const matchResult = matcher_.match();
94037
94091
  result = this.convertMatchResult(matchResult);
94038
94092
  }
@@ -94067,15 +94121,6 @@ var MatchResultParameter = class {
94067
94121
  this.type = type;
94068
94122
  }
94069
94123
  };
94070
- var FunctionMatcherSignature = class {
94071
- constructor(func) {
94072
- this.func = func;
94073
- this.parameters = new Cached();
94074
- }
94075
- getParameters() {
94076
- return this.parameters.getOrInsertWith(() => this.func.getParameters().map((p) => new Parameter2(p.entity, p.type)));
94077
- }
94078
- };
94079
94124
  var Parameter2 = class {
94080
94125
  constructor(entity, type) {
94081
94126
  this.entity = entity;
@@ -94088,34 +94133,6 @@ var Parameter2 = class {
94088
94133
  return this.entity.isOptional();
94089
94134
  }
94090
94135
  };
94091
- var FunctionTypeMatcherSignature = class {
94092
- constructor(analyzer, value) {
94093
- this.analyzer = analyzer;
94094
- this.value = value;
94095
- this.parameters = new Cached();
94096
- }
94097
- getParameters() {
94098
- return this.parameters.getOrInsertWith(() => this.value.getParameters().map((p) => new Parameter2(p.entity, p.getType())));
94099
- }
94100
- };
94101
- var MatcherConstructorSignature = class {
94102
- constructor(value) {
94103
- this.parameters = new Cached();
94104
- this.value = value;
94105
- }
94106
- getParameters() {
94107
- return this.parameters.getOrInsertWith(() => this.value.getParameters().map((p) => new Parameter2(p.entity, p.getType())));
94108
- }
94109
- };
94110
- var MatcherIndexerSignature = class {
94111
- constructor(value) {
94112
- this.parameters = new Cached();
94113
- this.value = value;
94114
- }
94115
- getParameters() {
94116
- return this.parameters.getOrInsertWith(() => this.value.getParameters().map((p) => new Parameter2(p.entity, p.getType())));
94117
- }
94118
- };
94119
94136
 
94120
94137
  // source/analysis/m/BaseExpressionMeaning.ts
94121
94138
  var Resolver = class {
@@ -94208,7 +94225,7 @@ var BaseOverloadResolver = class {
94208
94225
  const diagnosticsForMatcher = this.signatures.length === 1 ? this.diagnostics : void 0;
94209
94226
  const matcher_ = new ArgumentToParameterMatcher(
94210
94227
  this.analyzer,
94211
- s,
94228
+ s.getParameters(),
94212
94229
  this.arguments_,
94213
94230
  diagnosticsForMatcher,
94214
94231
  this.nodesForDiagnostic?.access
@@ -95449,9 +95466,15 @@ var Resolver5 = class {
95449
95466
  this.node.expression
95450
95467
  ));
95451
95468
  }
95452
- const signature = new FunctionTypeMatcherSignature2(this.analyzer, type);
95469
+ const parameters = type.getParameters().map((p) => new MatcherParameter(p.entity));
95453
95470
  const args = this.node.argumentList.arguments.map((a) => new SourceMatcherArgument(this.analyzer, a)).toArray();
95454
- const matcher_ = new ArgumentToParameterMatcher(this.analyzer, signature, args, this.diagnostics, this.node.argumentList);
95471
+ const matcher_ = new ArgumentToParameterMatcher(
95472
+ this.analyzer,
95473
+ parameters,
95474
+ args,
95475
+ this.diagnostics,
95476
+ this.node.argumentList
95477
+ );
95455
95478
  matcher_.match();
95456
95479
  return new Meaning_objectFunctionCall(type);
95457
95480
  }
@@ -95496,16 +95519,6 @@ var Meaning_unresolved2 = class {
95496
95519
  this.kind = "unresolved";
95497
95520
  }
95498
95521
  };
95499
- var FunctionTypeMatcherSignature2 = class {
95500
- constructor(analyzer, value) {
95501
- this.analyzer = analyzer;
95502
- this.value = value;
95503
- this.parameters = new Cached();
95504
- }
95505
- getParameters() {
95506
- return this.parameters.getOrInsertWith(() => this.value.getParameters().map((p) => new MatcherParameter(p.entity)));
95507
- }
95508
- };
95509
95522
  var MatcherParameter = class {
95510
95523
  constructor(entity) {
95511
95524
  this.entity = entity;
@@ -98031,7 +98044,7 @@ var PackageAndStaticVariablesInitializationValidator = class {
98031
98044
  }
98032
98045
  collectStaticFieldsThatNeedToBeInitializedInConstructor(typeEntity, result) {
98033
98046
  for (const member of typeEntity.getMembers().getNamedMembersM()) {
98034
- if (member.kind === 0 /* Variable */ && member.isStatic() && !member.isConstant() && !isVariableEntityWithExplicitAccessors(member) && member.isPreservedReducedTypeMember() === void 0 && !this.analyzer.isNullAssignableToType(member.getType())) {
98047
+ if (member.kind === 0 /* Variable */ && member.isStatic() && !isVariableEntityWithExplicitAccessors(member) && member.isPreservedReducedTypeMember() === void 0 && !this.analyzer.isNullAssignableToType(member.getType())) {
98035
98048
  const definition = member.getDefinition();
98036
98049
  if (definition.kind === 0 /* Source */) {
98037
98050
  if (definition.value.kind === "single" && (definition.value.node.kind === 1029 /* FieldDeclaration */ || definition.value.node.kind === 1102 /* StaticFieldDeclaration */) && definition.value.node.initializer === void 0) {
@@ -105127,27 +105140,45 @@ var ArgumentToParameterMatchResult2 = class {
105127
105140
  switch (meaning.kind) {
105128
105141
  case "function-call": {
105129
105142
  if (meaning.suitableOrSingleFunction !== void 0) {
105130
- const signature = new FunctionMatcherSignature2(meaning.suitableOrSingleFunction);
105143
+ const parameters = meaning.suitableOrSingleFunction.getParameters().map((p) => new Parameter3(p.entity, p.type));
105131
105144
  const args = node.argumentList.arguments.map((a) => new SourceMatcherArgument2(this.analyzer, a)).toArray();
105132
- const matcher_ = new ArgumentToParameterMatcher(this.analyzer, signature, args, void 0, void 0);
105145
+ const matcher_ = new ArgumentToParameterMatcher(
105146
+ this.analyzer,
105147
+ parameters,
105148
+ args,
105149
+ void 0,
105150
+ void 0
105151
+ );
105133
105152
  const matchResult = matcher_.match();
105134
105153
  result = this.convertMatchResult(matchResult);
105135
105154
  }
105136
105155
  break;
105137
105156
  }
105138
105157
  case "object-function-call": {
105139
- const signature = new FunctionTypeMatcherSignature3(this.analyzer, meaning.type);
105158
+ const parameters = meaning.type.getParameters().map((p) => new Parameter3(p.entity, p.getType()));
105140
105159
  const args = node.argumentList.arguments.map((a) => new SourceMatcherArgument2(this.analyzer, a)).toArray();
105141
- const matcher_ = new ArgumentToParameterMatcher(this.analyzer, signature, args, void 0, void 0);
105160
+ const matcher_ = new ArgumentToParameterMatcher(
105161
+ this.analyzer,
105162
+ parameters,
105163
+ args,
105164
+ void 0,
105165
+ void 0
105166
+ );
105142
105167
  const matchResult = matcher_.match();
105143
105168
  result = this.convertMatchResult(matchResult);
105144
105169
  break;
105145
105170
  }
105146
105171
  case "constructor-call":
105147
105172
  if (meaning.suitableOrSingleConstructor !== void 0) {
105148
- const signature = new MatcherConstructorSignature2(meaning.suitableOrSingleConstructor);
105173
+ const parameters = meaning.suitableOrSingleConstructor.getParameters().map((p) => new Parameter3(p.entity, p.getType()));
105149
105174
  const args = node.argumentList.arguments.map((a) => new SourceMatcherArgument2(this.analyzer, a)).toArray();
105150
- const matcher_ = new ArgumentToParameterMatcher(this.analyzer, signature, args, void 0, void 0);
105175
+ const matcher_ = new ArgumentToParameterMatcher(
105176
+ this.analyzer,
105177
+ parameters,
105178
+ args,
105179
+ void 0,
105180
+ void 0
105181
+ );
105151
105182
  const matchResult = matcher_.match();
105152
105183
  result = this.convertMatchResult(matchResult);
105153
105184
  }
@@ -105171,9 +105202,15 @@ var ArgumentToParameterMatchResult2 = class {
105171
105202
  switch (meaning.kind) {
105172
105203
  case "constructor-call":
105173
105204
  if (meaning.suitableOrSingleConstructor !== void 0) {
105174
- const signature = new MatcherConstructorSignature2(meaning.suitableOrSingleConstructor);
105205
+ const parameters = meaning.suitableOrSingleConstructor.getParameters().map((p) => new Parameter3(p.entity, p.getType()));
105175
105206
  const args = node.argumentList.arguments.map((a) => new SourceMatcherArgument2(this.analyzer, a)).toArray();
105176
- const matcher_ = new ArgumentToParameterMatcher(this.analyzer, signature, args, void 0, void 0);
105207
+ const matcher_ = new ArgumentToParameterMatcher(
105208
+ this.analyzer,
105209
+ parameters,
105210
+ args,
105211
+ void 0,
105212
+ void 0
105213
+ );
105177
105214
  const matchResult = matcher_.match();
105178
105215
  result = this.convertMatchResult(matchResult);
105179
105216
  } else {
@@ -105199,9 +105236,15 @@ var ArgumentToParameterMatchResult2 = class {
105199
105236
  switch (meaning.kind) {
105200
105237
  case "constructor-call":
105201
105238
  if (meaning.suitableOrSingleConstructor !== void 0) {
105202
- const signature = new MatcherConstructorSignature2(meaning.suitableOrSingleConstructor);
105239
+ const parameters = meaning.suitableOrSingleConstructor.getParameters().map((p) => new Parameter3(p.entity, p.getType()));
105203
105240
  const args = node.argumentList.arguments.map((a) => new SourceMatcherArgument2(this.analyzer, a)).toArray();
105204
- const matcher_ = new ArgumentToParameterMatcher(this.analyzer, signature, args, void 0, void 0);
105241
+ const matcher_ = new ArgumentToParameterMatcher(
105242
+ this.analyzer,
105243
+ parameters,
105244
+ args,
105245
+ void 0,
105246
+ void 0
105247
+ );
105205
105248
  const matchResult = matcher_.match();
105206
105249
  result = this.convertMatchResult(matchResult);
105207
105250
  } else {
@@ -105227,9 +105270,15 @@ var ArgumentToParameterMatchResult2 = class {
105227
105270
  switch (meaning.kind) {
105228
105271
  case "tag-type": {
105229
105272
  if (meaning.suitableOrSingleConstructor !== void 0) {
105230
- const signature = new MatcherConstructorSignature2(meaning.suitableOrSingleConstructor);
105273
+ const parameters = meaning.suitableOrSingleConstructor.getParameters().map((p) => new Parameter3(p.entity, p.getType()));
105231
105274
  const args = node.argumentList?.arguments.map((a) => new SourceMatcherArgument2(this.analyzer, a)).toArray() ?? [];
105232
- const matcher_ = new ArgumentToParameterMatcher(this.analyzer, signature, args, void 0, void 0);
105275
+ const matcher_ = new ArgumentToParameterMatcher(
105276
+ this.analyzer,
105277
+ parameters,
105278
+ args,
105279
+ void 0,
105280
+ void 0
105281
+ );
105233
105282
  const matchResult = matcher_.match();
105234
105283
  result = this.convertMatchResult(matchResult);
105235
105284
  }
@@ -105237,9 +105286,15 @@ var ArgumentToParameterMatchResult2 = class {
105237
105286
  }
105238
105287
  case "tag-function": {
105239
105288
  if (meaning.suitableOrSingleFunction !== void 0) {
105240
- const signature = new FunctionMatcherSignature2(meaning.suitableOrSingleFunction);
105289
+ const parameters = meaning.suitableOrSingleFunction.getParameters().map((p) => new Parameter3(p.entity, p.type));
105241
105290
  const args = node.argumentList?.arguments.map((a) => new SourceMatcherArgument2(this.analyzer, a)).toArray() ?? [];
105242
- const matcher_ = new ArgumentToParameterMatcher(this.analyzer, signature, args, void 0, void 0);
105291
+ const matcher_ = new ArgumentToParameterMatcher(
105292
+ this.analyzer,
105293
+ parameters,
105294
+ args,
105295
+ void 0,
105296
+ void 0
105297
+ );
105243
105298
  const matchResult = matcher_.match();
105244
105299
  result = this.convertMatchResult(matchResult);
105245
105300
  break;
@@ -105264,9 +105319,15 @@ var ArgumentToParameterMatchResult2 = class {
105264
105319
  switch (meaning.kind) {
105265
105320
  case "resolved": {
105266
105321
  if (meaning.singleIndexer !== void 0) {
105267
- const signature = new MatcherIndexerSignature2(meaning.singleIndexer);
105322
+ const parameters = meaning.singleIndexer.getParameters().map((p) => new Parameter3(p.entity, p.getType()));
105268
105323
  const args = node.argumentList?.arguments.map((a) => new SourceMatcherArgument2(this.analyzer, a)).toArray() ?? [];
105269
- const matcher_ = new ArgumentToParameterMatcher(this.analyzer, signature, args, void 0, void 0);
105324
+ const matcher_ = new ArgumentToParameterMatcher(
105325
+ this.analyzer,
105326
+ parameters,
105327
+ args,
105328
+ void 0,
105329
+ void 0
105330
+ );
105270
105331
  const matchResult = matcher_.match();
105271
105332
  result = this.convertMatchResult(matchResult);
105272
105333
  }
@@ -105301,15 +105362,6 @@ var MatchResultParameter3 = class {
105301
105362
  this.type = type;
105302
105363
  }
105303
105364
  };
105304
- var FunctionMatcherSignature2 = class {
105305
- constructor(func) {
105306
- this.func = func;
105307
- this.parameters = new Cached();
105308
- }
105309
- getParameters() {
105310
- return this.parameters.getOrInsertWith(() => this.func.getParameters().map((p) => new Parameter3(p.entity, p.type)));
105311
- }
105312
- };
105313
105365
  var Parameter3 = class {
105314
105366
  constructor(entity, type) {
105315
105367
  this.entity = entity;
@@ -105322,34 +105374,6 @@ var Parameter3 = class {
105322
105374
  return this.entity.isOptional();
105323
105375
  }
105324
105376
  };
105325
- var FunctionTypeMatcherSignature3 = class {
105326
- constructor(analyzer, value) {
105327
- this.analyzer = analyzer;
105328
- this.value = value;
105329
- this.parameters = new Cached();
105330
- }
105331
- getParameters() {
105332
- return this.parameters.getOrInsertWith(() => this.value.getParameters().map((p) => new Parameter3(p.entity, p.getType())));
105333
- }
105334
- };
105335
- var MatcherConstructorSignature2 = class {
105336
- constructor(value) {
105337
- this.parameters = new Cached();
105338
- this.value = value;
105339
- }
105340
- getParameters() {
105341
- return this.parameters.getOrInsertWith(() => this.value.getParameters().map((p) => new Parameter3(p.entity, p.getType())));
105342
- }
105343
- };
105344
- var MatcherIndexerSignature2 = class {
105345
- constructor(value) {
105346
- this.parameters = new Cached();
105347
- this.value = value;
105348
- }
105349
- getParameters() {
105350
- return this.parameters.getOrInsertWith(() => this.value.getParameters().map((p) => new Parameter3(p.entity, p.getType())));
105351
- }
105352
- };
105353
105377
 
105354
105378
  // source/analysis/a/ExpressionAnalysisOptions.ts
105355
105379
  var ExpressionAnalysisOptions2 = class _ExpressionAnalysisOptions {
@@ -108780,9 +108804,9 @@ var Resolver15 = class {
108780
108804
  this.node.expression
108781
108805
  ));
108782
108806
  }
108783
- const signature = new FunctionTypeMatcherSignature4(this.analyzer, type);
108807
+ const parameters = type.getParameters().map((p) => new MatcherParameter2(p.entity));
108784
108808
  const args = this.node.argumentList.arguments.map((a) => new SourceMatcherArgument2(this.analyzer, a)).toArray();
108785
- const matcher_ = new ArgumentToParameterMatcher(this.analyzer, signature, args, this.diagnostics, this.node.argumentList);
108809
+ const matcher_ = new ArgumentToParameterMatcher(this.analyzer, parameters, args, this.diagnostics, this.node.argumentList);
108786
108810
  matcher_.match();
108787
108811
  return new Meaning_objectFunctionCall2(type);
108788
108812
  }
@@ -108814,16 +108838,6 @@ var Meaning_unresolved12 = class {
108814
108838
  this.kind = "unresolved";
108815
108839
  }
108816
108840
  };
108817
- var FunctionTypeMatcherSignature4 = class {
108818
- constructor(analyzer, value) {
108819
- this.analyzer = analyzer;
108820
- this.value = value;
108821
- this.parameters = new Cached();
108822
- }
108823
- getParameters() {
108824
- return this.parameters.getOrInsertWith(() => this.value.getParameters().map((p) => new MatcherParameter2(p.entity)));
108825
- }
108826
- };
108827
108841
  var MatcherParameter2 = class {
108828
108842
  constructor(entity) {
108829
108843
  this.entity = entity;
@@ -111152,7 +111166,7 @@ var PackageAndStaticVariablesInitializationValidator2 = class {
111152
111166
  }
111153
111167
  collectStaticFieldsThatNeedToBeInitializedInConstructor(typeEntity, result) {
111154
111168
  for (const member of typeEntity.getMembers().getNamedMembersA()) {
111155
- if (member.kind === 0 /* Variable */ && member.isStatic() && !member.isConstant() && !isVariableEntityWithExplicitAccessors(member) && member.isPreservedReducedTypeMember() === void 0 && !this.analyzer.isNullAssignableToType(member.getType())) {
111169
+ if (member.kind === 0 /* Variable */ && member.isStatic() && !isVariableEntityWithExplicitAccessors(member) && member.isPreservedReducedTypeMember() === void 0 && !this.analyzer.isNullAssignableToType(member.getType())) {
111156
111170
  const definition = member.getDefinition();
111157
111171
  if (definition.kind === 0 /* Source */) {
111158
111172
  if (definition.value.kind === "single" && definition.value.node.kind === 46 /* FieldDeclaration */ && definition.value.node.initializer === void 0) {
@@ -2,13 +2,13 @@ import { Name } from '../common/index.js';
2
2
  import { DiagnosticAcceptor } from '../diagnostic/Diagnostic.js';
3
3
  import { Analyzer } from './Analyzer.js';
4
4
  import { NodeOrDiagnosticLocation } from './NodeOrDiagnosticLocation.js';
5
- export declare class ArgumentToParameterMatcher<TSignature extends ISignature<TParameter>, TParameter extends ISignatureParameter, TArgument extends IArgument> {
5
+ export declare class ArgumentToParameterMatcher<TParameter extends ISignatureParameter, TArgument extends IArgument> {
6
6
  private readonly analyzer;
7
- private readonly signature;
7
+ private readonly parameters;
8
8
  private readonly arguments_;
9
9
  private readonly diagnostics;
10
10
  private readonly unmatchedRequiredParametersDiagnosticLocation;
11
- constructor(analyzer: Analyzer, signature: TSignature, arguments_: readonly TArgument[], diagnostics: DiagnosticAcceptor | undefined, unmatchedRequiredParametersDiagnosticLocation: NodeOrDiagnosticLocation | undefined);
11
+ constructor(analyzer: Analyzer, parameters: readonly TParameter[], arguments_: readonly TArgument[], diagnostics: DiagnosticAcceptor | undefined, unmatchedRequiredParametersDiagnosticLocation: NodeOrDiagnosticLocation | undefined);
12
12
  match(): MatchResult<TParameter, TArgument>;
13
13
  private matchArgumentsToParameters;
14
14
  private reportArgumentDiagnostic;
@@ -18,9 +18,6 @@ export declare class MatchResult<TParameter extends ISignatureParameter, TArgume
18
18
  readonly isMatching: boolean;
19
19
  constructor(mapping: ReadonlyMap<TArgument, TParameter>, isMatching: boolean);
20
20
  }
21
- export interface ISignature<TParameter extends ISignatureParameter> {
22
- getParameters(): readonly TParameter[];
23
- }
24
21
  export interface ISignatureParameter {
25
22
  getName(): Name | undefined;
26
23
  isOptional(): boolean;
@@ -30,7 +30,7 @@ export declare abstract class BaseOverloadResolver<TSignature extends ISignature
30
30
  private tryChooseBetterSignatureBasedOnParameterCount;
31
31
  private reportAmbiguousAccessDiagnostic;
32
32
  }
33
- export interface ISignature<TParameter extends ISignatureParameter> extends matcher.ISignature<TParameter> {
33
+ export interface ISignature<TParameter extends ISignatureParameter> {
34
34
  getTypeParameters(): readonly TypeParameterEntity[];
35
35
  getParameters(): readonly TParameter[];
36
36
  getReturnType(): types.Type | undefined;
@@ -58,6 +58,7 @@ export declare enum TypeMemberLookupOptions {
58
58
  */
59
59
  CheckAccessibilityIgnoringReceiverType = 8,
60
60
  NoBaseTypeMembers = 16,
61
+ DoNotContinueSearchInObjectTypeAfterSearchInAspectType = 32,
61
62
  OnlyInstanceOrOnlyStaticMembers = 3,
62
63
  NoBaseTypeAndExtensionMembers = 20
63
64
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artel/artc",
3
- "version": "0.9.26025-pre-release",
3
+ "version": "0.9.26026-pre-release",
4
4
  "description": "Артель Компилятор | Artel Compiler",
5
5
  "author": "Nezaboodka Team <contact@nezaboodka.com>",
6
6
  "license": "Apache-2.0",