@abaplint/cli 2.113.169 → 2.113.171

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 (2) hide show
  1. package/build/cli.js +17 -3
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -7890,7 +7890,7 @@ class Source extends combi_1.Expression {
7890
7890
  // paren used for eg. "( 2 + 1 ) * 4"
7891
7891
  const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), Source, rparen);
7892
7892
  const after = (0, combi_1.seq)((0, combi_1.altPrio)("&", "&&", _1.ArithOperator), Source);
7893
- const bool = (0, combi_1.seq)((0, combi_1.altPrio)((0, combi_1.ver)(version_1.Version.v702, (0, combi_1.regex)(/^BOOLC$/i), version_1.Version.OpenABAP), (0, combi_1.ver)(version_1.Version.v740sp08, (0, combi_1.regex)(/^XSDBOOL$/i)), version_1.Version.OpenABAP), (0, combi_1.tok)(tokens_1.ParenLeftW), _1.Cond, ")");
7893
+ const bool = (0, combi_1.seq)((0, combi_1.altPrio)((0, combi_1.ver)(version_1.Version.v702, (0, combi_1.regex)(/^BOOLC$/i), version_1.Version.OpenABAP), (0, combi_1.ver)(version_1.Version.v740sp08, (0, combi_1.regex)(/^XSDBOOL$/i), version_1.Version.OpenABAP)), (0, combi_1.tok)(tokens_1.ParenLeftW), _1.Cond, ")");
7894
7894
  const prefix = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WPlus), "BIT-NOT");
7895
7895
  const old = (0, combi_1.seq)((0, combi_1.optPrio)(prefix), (0, combi_1.altPrio)(_1.Constant, _1.StringTemplate, text_element_1.TextElement, bool, method, (0, combi_1.seq)(_1.FieldChain, deref), paren), (0, combi_1.optPrio)(after));
7896
7896
  const corr = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("CORRESPONDING", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.CorrespondingBody, rparen, (0, combi_1.optPrio)(after)));
@@ -27449,11 +27449,15 @@ const basic_types_1 = __webpack_require__(/*! ../basic_types */ "./node_modules/
27449
27449
  const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js");
27450
27450
  const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
27451
27451
  const assert_error_1 = __webpack_require__(/*! ../assert_error */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/assert_error.js");
27452
+ const _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ "./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js");
27452
27453
  class NewObject {
27453
27454
  static runSyntax(node, input, targetType) {
27454
27455
  let ret = undefined;
27455
27456
  const typeExpr = node.findDirectExpression(Expressions.TypeNameOrInfer);
27456
27457
  const typeToken = typeExpr === null || typeExpr === void 0 ? void 0 : typeExpr.getFirstToken();
27458
+ if (typeToken === undefined) {
27459
+ throw new Error("NewObject, child TypeNameOrInfer not found");
27460
+ }
27457
27461
  const typeName = typeExpr === null || typeExpr === void 0 ? void 0 : typeExpr.concatTokens();
27458
27462
  if (typeName === undefined) {
27459
27463
  throw new assert_error_1.AssertError("NewObject, child TypeNameOrInfer not found");
@@ -27461,7 +27465,8 @@ class NewObject {
27461
27465
  else if (typeName === "#" && targetType && targetType instanceof basic_1.ObjectReferenceType) {
27462
27466
  const clas = input.scope.findClassDefinition(targetType.getIdentifierName());
27463
27467
  if (clas) {
27464
- input.scope.addReference(typeToken, clas, _reference_1.ReferenceType.InferredType, input.filename);
27468
+ const tid = new _typed_identifier_1.TypedIdentifier(typeToken, input.filename, targetType);
27469
+ input.scope.addReference(typeToken, tid, _reference_1.ReferenceType.InferredType, input.filename);
27465
27470
  input.scope.addReference(typeToken, clas, _reference_1.ReferenceType.ConstructorReference, input.filename, { ooName: clas.getName() });
27466
27471
  }
27467
27472
  else {
@@ -54817,7 +54822,7 @@ class Registry {
54817
54822
  }
54818
54823
  static abaplintVersion() {
54819
54824
  // magic, see build script "version.sh"
54820
- return "2.113.169";
54825
+ return "2.113.171";
54821
54826
  }
54822
54827
  getDDICReferences() {
54823
54828
  return this.ddicReferences;
@@ -62896,6 +62901,15 @@ ${indentation} output = ${uniqueName}.\n`;
62896
62901
  cdef = r.resolved;
62897
62902
  }
62898
62903
  }
62904
+ if (cdef instanceof _typed_identifier_1.TypedIdentifier) {
62905
+ const foo = cdef.getType();
62906
+ if (foo instanceof basic_1.ObjectReferenceType) {
62907
+ cdef = foo.getIdentifier();
62908
+ }
62909
+ else {
62910
+ throw new Error("newParameters, downport, unexpected");
62911
+ }
62912
+ }
62899
62913
  if (cdef && cdef.getMethodDefinitions === undefined) {
62900
62914
  return undefined; // something wrong
62901
62915
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.169",
3
+ "version": "2.113.171",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.113.169",
41
+ "@abaplint/core": "^2.113.171",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",