@artel/artc 0.6.25260 → 0.6.25262

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-7FERF2MU.js";
5
- import "./chunk-ZNXSVPQT.js";
4
+ } from "./chunk-C32OUNTY.js";
5
+ import "./chunk-3LDKXMHH.js";
6
6
  import {
7
7
  __async
8
- } from "./chunk-RIIOVQBM.js";
8
+ } from "./chunk-LV35QVOW.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-ZNXSVPQT.js";
3
+ } from "../chunk-3LDKXMHH.js";
4
4
  import {
5
5
  AccessKind,
6
6
  AccessedFunctionParameter,
@@ -344,7 +344,7 @@ import {
344
344
  withoutQuotes,
345
345
  withoutTemplateQuotes,
346
346
  yieldExecution
347
- } from "../chunk-RIIOVQBM.js";
347
+ } from "../chunk-LV35QVOW.js";
348
348
  export {
349
349
  AccessKind,
350
350
  AccessedFunctionParameter,
@@ -6,9 +6,9 @@ import {
6
6
  PhysicalFileSystem,
7
7
  PhysicalTypeScriptLibrariesProvider,
8
8
  PrintingDiagnosticAcceptor
9
- } from "../chunk-7FERF2MU.js";
10
- import "../chunk-ZNXSVPQT.js";
11
- import "../chunk-RIIOVQBM.js";
9
+ } from "../chunk-C32OUNTY.js";
10
+ import "../chunk-3LDKXMHH.js";
11
+ import "../chunk-LV35QVOW.js";
12
12
  export {
13
13
  CommandLineCompiler,
14
14
  FileSystemUri,
@@ -181,7 +181,7 @@ import {
181
181
  unwrapParenthesizedExpressions,
182
182
  visitChildren,
183
183
  yieldExecution
184
- } from "../chunk-RIIOVQBM.js";
184
+ } from "../chunk-LV35QVOW.js";
185
185
 
186
186
  // source/services/CustomCommand.ts
187
187
  import * as ls from "vscode-languageserver";
@@ -10,7 +10,7 @@ import {
10
10
  WellKnownDeclarationsLoadError,
11
11
  __async,
12
12
  createTsInteropInputsForCompilation
13
- } from "./chunk-RIIOVQBM.js";
13
+ } from "./chunk-LV35QVOW.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-ZNXSVPQT.js";
3
+ } from "./chunk-3LDKXMHH.js";
4
4
  import {
5
5
  ArtelVersion,
6
6
  Cached,
@@ -14,7 +14,7 @@ import {
14
14
  __async,
15
15
  performanceMeasurementStageNames,
16
16
  performanceMeasurementStages
17
- } from "./chunk-RIIOVQBM.js";
17
+ } from "./chunk-LV35QVOW.js";
18
18
 
19
19
  // source/executor/FileSystemUri.ts
20
20
  import { platform } from "os";
@@ -690,7 +690,7 @@ var UniqueWithComparatorQuery = class extends Query {
690
690
  };
691
691
 
692
692
  // source/common/Constants.ts
693
- var ArtelVersion = true ? "0.6.25260" : "";
693
+ var ArtelVersion = true ? "0.6.25262" : "";
694
694
  var ArtelSourceFileExtensions = [".\u0430\u0440\u0442", ".\u0430\u0440\u0442\u0435\u043B\u044C", ".art", ".artel"];
695
695
  var ArtelSourceFileExtensionSet = new Set(ArtelSourceFileExtensions);
696
696
  var ArtelSourceAndConfigurationFileExtensionSet = new Set(ArtelSourceFileExtensionSet).add(".json");
@@ -32302,12 +32302,16 @@ var TypeArgumentInferrer = class {
32302
32302
  inferFromTypes(sourceType, targetType, priority) {
32303
32303
  if (targetType.kind === "parameter") {
32304
32304
  this.inferToParameterType(sourceType, targetType, priority);
32305
+ } else if (sourceType.kind === "alias" || targetType.kind === "alias") {
32306
+ this.inferFromTypes(unaliasType(sourceType), unaliasType(targetType), priority);
32307
+ } else if (targetType.kind === "union") {
32308
+ this.inferToUnionType(sourceType, targetType, priority);
32309
+ } else if (sourceType.kind === "union") {
32310
+ this.inferFromUnionType(sourceType, targetType, priority);
32305
32311
  } else if (targetType.kind === "structured") {
32306
32312
  this.inferToStructuredType(sourceType, targetType, priority);
32307
32313
  } else if (sourceType.kind === "function" && targetType.kind === "function") {
32308
32314
  this.inferFromFunctionTypes(sourceType, targetType, priority);
32309
- } else if (targetType.kind === "union") {
32310
- this.inferToUnionType(sourceType, targetType, priority);
32311
32315
  }
32312
32316
  }
32313
32317
  inferToParameterType(sourceType, targetType, priority) {
@@ -32374,6 +32378,11 @@ var TypeArgumentInferrer = class {
32374
32378
  }
32375
32379
  this.inferFromTypes(sourceType.getReturnType(), targetType.getReturnType(), priority);
32376
32380
  }
32381
+ inferFromUnionType(sourceType, targetType, priority) {
32382
+ for (const constituentType of sourceType.originalTypes) {
32383
+ this.inferFromTypes(constituentType, targetType, priority);
32384
+ }
32385
+ }
32377
32386
  createSubstitutions(untilIndex) {
32378
32387
  const typeArguments = new Array();
32379
32388
  let i = 0;
@@ -38062,8 +38071,12 @@ var TypeNarrower = class _TypeNarrower {
38062
38071
  }
38063
38072
  return typeAtPredecessor;
38064
38073
  }
38065
- case 72 /* IsExpression */:
38066
- return this.getTypeAtIsExpression(typeAtPredecessor, node.syntaxNode, node.isTrue);
38074
+ case 72 /* IsExpression */: {
38075
+ if (this.isSameReferenceAsNarrowedExpression(node.syntaxNode.expression)) {
38076
+ return this.getTypeAtIsExpression(typeAtPredecessor, node.syntaxNode, node.isTrue);
38077
+ }
38078
+ return typeAtPredecessor;
38079
+ }
38067
38080
  default:
38068
38081
  Debug.never(node.syntaxNode);
38069
38082
  }
@@ -39,6 +39,7 @@ export declare class TypeArgumentInferrer {
39
39
  private inferFromSubstitutions;
40
40
  private inferToUnionType;
41
41
  private inferFromFunctionTypes;
42
+ private inferFromUnionType;
42
43
  private createSubstitutions;
43
44
  private inferFromTargetTypeDependentExpression;
44
45
  private tryGetInferredType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artel/artc",
3
- "version": "0.6.25260",
3
+ "version": "0.6.25262",
4
4
  "description": "Артель Компилятор | Artel Compiler",
5
5
  "author": "Nezaboodka Team <contact@nezaboodka.com>",
6
6
  "license": "LGPL-3.0-or-later",