@abaplint/core 2.115.22 → 2.115.23

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.
@@ -9,7 +9,7 @@ const let_1 = require("./let");
9
9
  class Cast extends combi_1.Expression {
10
10
  getRunnable() {
11
11
  const rparen = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenRightW), (0, combi_1.tok)(tokens_1.WParenRight));
12
- const cast = (0, combi_1.seq)("CAST", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), (0, combi_1.optPrio)(let_1.Let), _1.Source, rparen);
12
+ const cast = (0, combi_1.seq)("CAST", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), (0, combi_1.optPrio)(let_1.Let), _1.Source, rparen, (0, combi_1.opt)(_1.Dereference));
13
13
  return (0, combi_1.ver)(version_1.Version.v740sp02, cast, version_1.Version.OpenABAP);
14
14
  }
15
15
  }
@@ -14,8 +14,7 @@ class Move {
14
14
  const equals = (0, combi_1.altPrio)((0, combi_1.altPrio)(chained, "?="), calcAssign);
15
15
  // todo, move "?=" to CAST?
16
16
  const eq = (0, combi_1.seq)(expressions_1.Target, equals, expressions_1.Source);
17
- const eqd = (0, combi_1.seq)(expressions_1.Target, equals, expressions_1.Source, expressions_1.Dereference);
18
- return (0, combi_1.alt)(move, eq, eqd);
17
+ return (0, combi_1.alt)(move, eq);
19
18
  }
20
19
  }
21
20
  exports.Move = Move;
@@ -72,8 +72,9 @@ class CreateObject {
72
72
  return;
73
73
  }
74
74
  else if (found instanceof basic_1.ObjectReferenceType) {
75
- const id = found.getIdentifier();
76
- if (id instanceof types_1.InterfaceDefinition && type === undefined) {
75
+ const identifier = found.getIdentifier();
76
+ const idFound = input.scope.findObjectDefinition(identifier.getName());
77
+ if (idFound instanceof types_1.InterfaceDefinition && type === undefined) {
77
78
  const message = "Interface reference, cannot be instantiated";
78
79
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
79
80
  return;
@@ -85,11 +86,11 @@ class CreateObject {
85
86
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
86
87
  return;
87
88
  }
88
- else if (id instanceof types_1.ClassDefinition && cdef === undefined) {
89
- cdef = id;
89
+ else if (idFound instanceof types_1.ClassDefinition && cdef === undefined) {
90
+ cdef = idFound;
90
91
  }
91
- if (type === undefined && id instanceof types_1.ClassDefinition && id.isAbstract() === true) {
92
- const message = id.getName() + " is abstract, cannot be instantiated";
92
+ if (type === undefined && idFound instanceof types_1.ClassDefinition && idFound.isAbstract() === true) {
93
+ const message = identifier.getName() + " is abstract, cannot be instantiated";
93
94
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
94
95
  return;
95
96
  }
@@ -74,7 +74,7 @@ class Registry {
74
74
  }
75
75
  static abaplintVersion() {
76
76
  // magic, see build script "version.sh"
77
- return "2.115.22";
77
+ return "2.115.23";
78
78
  }
79
79
  getDDICReferences() {
80
80
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.115.22",
3
+ "version": "2.115.23",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",