@abaplint/core 2.115.9 → 2.115.11

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.
@@ -14,7 +14,7 @@ class SQLCompare extends combi_1.Expression {
14
14
  const nul = (0, combi_1.seq)("IS", (0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)("NULL", (0, combi_1.ver)(version_1.Version.v753, "INITIAL")));
15
15
  const source = new _1.SQLSource();
16
16
  const sub = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("ALL", "ANY", "SOME")), (0, combi_1.altPrio)(subSelect, subSelectDouble));
17
- const arith = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/"), _1.SQLFieldName)));
17
+ const arith = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/"), _1.SQLFieldName)), version_1.Version.OpenABAP);
18
18
  const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), _1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
19
19
  const at = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.altPrio)(_1.SimpleSource3, paren)), version_1.Version.OpenABAP);
20
20
  const rett = (0, combi_1.seq)((0, combi_1.altPrio)(_1.SQLFunction, _1.ConstantString, (0, combi_1.seq)((0, combi_1.altPrio)(_1.SQLPath, _1.SQLFieldName), (0, combi_1.optPrio)(arith)), at), (0, combi_1.altPrio)((0, combi_1.seq)(_1.SQLCompareOperator, (0, combi_1.altPrio)(sub, source)), (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)(_1.SQLIn, like, between)), nul));
@@ -14,6 +14,7 @@ const sql_order_by_1 = require("./sql_order_by");
14
14
  const dynamic_1 = require("./dynamic");
15
15
  const _reference_1 = require("../_reference");
16
16
  const _syntax_input_1 = require("../_syntax_input");
17
+ const version_1 = require("../../../version");
17
18
  const isSimple = /^\w+$/;
18
19
  class Select {
19
20
  static runSyntax(node, input, skipImplicitInto = false) {
@@ -265,6 +266,16 @@ class Select {
265
266
  if (field) {
266
267
  return field;
267
268
  }
269
+ else if (fields[0].code === "COUNT(*)") {
270
+ if (scope.getVersion() >= version_1.Version.v750
271
+ || scope.getVersion() === version_1.Version.OpenABAP
272
+ || scope.getVersion() === version_1.Version.Cloud) {
273
+ return new basic_1.Integer8Type();
274
+ }
275
+ else {
276
+ return basic_1.IntegerType.get();
277
+ }
278
+ }
268
279
  else {
269
280
  // todo: aggregated/calculated values
270
281
  return basic_1.VoidType.get("SELECT_todo11");
@@ -47,8 +47,9 @@ class CreateObject {
47
47
  target_1.Target.runSyntax(t, input);
48
48
  }
49
49
  const t = node.findDirectExpression(Expressions.Target);
50
+ let found = undefined;
50
51
  if (t) {
51
- const found = target_1.Target.runSyntax(t, input);
52
+ found = target_1.Target.runSyntax(t, input);
52
53
  if (found instanceof basic_1.VoidType) {
53
54
  // do nothing
54
55
  }
@@ -100,7 +101,11 @@ class CreateObject {
100
101
  for (const t of node.findDirectExpressions(Expressions.Dynamic)) {
101
102
  dynamic_1.Dynamic.runSyntax(t, input);
102
103
  }
103
- input.scope.addReference(t === null || t === void 0 ? void 0 : t.getFirstToken(), cdef, _reference_1.ReferenceType.ConstructorReference, input.filename, { ooName: cdef === null || cdef === void 0 ? void 0 : cdef.getName() });
104
+ let ooName = cdef === null || cdef === void 0 ? void 0 : cdef.getName();
105
+ if (ooName === undefined && found instanceof basic_1.VoidType) {
106
+ ooName = found.getVoided();
107
+ }
108
+ input.scope.addReference(t === null || t === void 0 ? void 0 : t.getFirstToken(), cdef, _reference_1.ReferenceType.ConstructorReference, input.filename, { ooName: ooName });
104
109
  this.validateParameters(cdef, node, input);
105
110
  }
106
111
  validateParameters(cdef, node, input) {
@@ -74,7 +74,7 @@ class Registry {
74
74
  }
75
75
  static abaplintVersion() {
76
76
  // magic, see build script "version.sh"
77
- return "2.115.9";
77
+ return "2.115.11";
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.9",
3
+ "version": "2.115.11",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",