@abaplint/core 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.
@@ -22,7 +22,7 @@ class Source extends combi_1.Expression {
22
22
  // paren used for eg. "( 2 + 1 ) * 4"
23
23
  const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), Source, rparen);
24
24
  const after = (0, combi_1.seq)((0, combi_1.altPrio)("&", "&&", _1.ArithOperator), Source);
25
- 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, ")");
25
+ 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, ")");
26
26
  const prefix = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WPlus), "BIT-NOT");
27
27
  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));
28
28
  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)));
@@ -11,11 +11,15 @@ const basic_types_1 = require("../basic_types");
11
11
  const _type_utils_1 = require("../_type_utils");
12
12
  const _syntax_input_1 = require("../_syntax_input");
13
13
  const assert_error_1 = require("../assert_error");
14
+ const _typed_identifier_1 = require("../../types/_typed_identifier");
14
15
  class NewObject {
15
16
  static runSyntax(node, input, targetType) {
16
17
  let ret = undefined;
17
18
  const typeExpr = node.findDirectExpression(Expressions.TypeNameOrInfer);
18
19
  const typeToken = typeExpr === null || typeExpr === void 0 ? void 0 : typeExpr.getFirstToken();
20
+ if (typeToken === undefined) {
21
+ throw new Error("NewObject, child TypeNameOrInfer not found");
22
+ }
19
23
  const typeName = typeExpr === null || typeExpr === void 0 ? void 0 : typeExpr.concatTokens();
20
24
  if (typeName === undefined) {
21
25
  throw new assert_error_1.AssertError("NewObject, child TypeNameOrInfer not found");
@@ -23,7 +27,8 @@ class NewObject {
23
27
  else if (typeName === "#" && targetType && targetType instanceof basic_1.ObjectReferenceType) {
24
28
  const clas = input.scope.findClassDefinition(targetType.getIdentifierName());
25
29
  if (clas) {
26
- input.scope.addReference(typeToken, clas, _reference_1.ReferenceType.InferredType, input.filename);
30
+ const tid = new _typed_identifier_1.TypedIdentifier(typeToken, input.filename, targetType);
31
+ input.scope.addReference(typeToken, tid, _reference_1.ReferenceType.InferredType, input.filename);
27
32
  input.scope.addReference(typeToken, clas, _reference_1.ReferenceType.ConstructorReference, input.filename, { ooName: clas.getName() });
28
33
  }
29
34
  else {
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.169";
70
+ return "2.113.171";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
@@ -2992,6 +2992,15 @@ ${indentation} output = ${uniqueName}.\n`;
2992
2992
  cdef = r.resolved;
2993
2993
  }
2994
2994
  }
2995
+ if (cdef instanceof _typed_identifier_1.TypedIdentifier) {
2996
+ const foo = cdef.getType();
2997
+ if (foo instanceof basic_1.ObjectReferenceType) {
2998
+ cdef = foo.getIdentifier();
2999
+ }
3000
+ else {
3001
+ throw new Error("newParameters, downport, unexpected");
3002
+ }
3003
+ }
2995
3004
  if (cdef && cdef.getMethodDefinitions === undefined) {
2996
3005
  return undefined; // something wrong
2997
3006
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.169",
3
+ "version": "2.113.171",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",