@abaplint/core 2.120.106 → 2.120.107

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.
@@ -127,8 +127,8 @@ class ValueBody {
127
127
  }
128
128
  for (const s of foo.findDirectExpressions(Expressions.Source)) {
129
129
  const sourceType = source_1.Source.runSyntax(s, input, rowType);
130
- if (rowType instanceof basic_1.StringType && sourceType instanceof basic_1.CharacterType) {
131
- const message = "VALUE, source type CharacterType not compatible with StringType";
130
+ if ((rowType instanceof basic_1.StringType || rowType instanceof basic_1.XStringType) && sourceType instanceof basic_1.CharacterType) {
131
+ const message = "VALUE, source type CharacterType not compatible with " + rowType.constructor.name;
132
132
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, s.getFirstToken(), message));
133
133
  }
134
134
  else if (this.insertsUsingTableKey(targetType)) {
@@ -48,6 +48,11 @@ class Append {
48
48
  let targetType = undefined;
49
49
  const target = node.findDirectExpression(Expressions.Target);
50
50
  if (target) {
51
+ if (target.findDirectExpression(Expressions.TableExpression) !== undefined) {
52
+ const message = "APPEND, table expression not allowed in target";
53
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, target.getFirstToken(), message));
54
+ return;
55
+ }
51
56
  targetType = target_1.Target.runSyntax(target, input);
52
57
  }
53
58
  // a hashed table has no index, APPEND adds at the end
@@ -48,7 +48,7 @@ const _raise_message_1 = require("../_raise_message");
48
48
  class Raise {
49
49
  runSyntax(node, input) {
50
50
  // todo
51
- var _a, _b, _c, _d, _e, _f;
51
+ var _a, _b, _c, _d, _e, _f, _g;
52
52
  const helper = new _object_oriented_1.ObjectOriented(input.scope);
53
53
  let method;
54
54
  const exceptionName = node.findDirectExpression(Expressions.ExceptionName);
@@ -64,7 +64,12 @@ class Raise {
64
64
  if (found === null || found === void 0 ? void 0 : found.id) {
65
65
  input.scope.addReference(classTok, found.id, _reference_1.ReferenceType.ObjectOrientedReference, input.filename);
66
66
  const def = input.scope.findObjectDefinition(className);
67
- method = (_b = helper.searchMethodName(def, "CONSTRUCTOR")) === null || _b === void 0 ? void 0 : _b.method;
67
+ if (((_b = input.scope.findClassDefinition(className)) === null || _b === void 0 ? void 0 : _b.isAbstract()) === true) {
68
+ const message = className + " is abstract, cannot be instantiated";
69
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, classTok, message));
70
+ return;
71
+ }
72
+ method = (_c = helper.searchMethodName(def, "CONSTRUCTOR")) === null || _c === void 0 ? void 0 : _c.method;
68
73
  }
69
74
  else if (input.scope.getDDIC().inErrorNamespace(className) === false) {
70
75
  const extra = { ooName: className, ooType: "Void" };
@@ -88,7 +93,7 @@ class Raise {
88
93
  }
89
94
  else if (type instanceof basic_1.ObjectReferenceType) {
90
95
  const def = input.scope.findObjectDefinition(type.getIdentifierName());
91
- method = (_c = helper.searchMethodName(def, "CONSTRUCTOR")) === null || _c === void 0 ? void 0 : _c.method;
96
+ method = (_d = helper.searchMethodName(def, "CONSTRUCTOR")) === null || _d === void 0 ? void 0 : _d.method;
92
97
  }
93
98
  else if (type !== undefined) {
94
99
  const message = "RAISE EXCEPTION, must be object reference, got " + type.constructor.name;
@@ -117,10 +122,10 @@ class Raise {
117
122
  for (const s of node.findDirectExpressions(Expressions.MessageSource)) {
118
123
  message_source_1.MessageSource.runSyntax(s, input);
119
124
  }
120
- const id = (_d = node.findExpressionAfterToken("ID")) === null || _d === void 0 ? void 0 : _d.concatTokens();
121
- let number = (_e = node.findDirectExpression(Expressions.MessageNumber)) === null || _e === void 0 ? void 0 : _e.concatTokens();
125
+ const id = (_e = node.findExpressionAfterToken("ID")) === null || _e === void 0 ? void 0 : _e.concatTokens();
126
+ let number = (_f = node.findDirectExpression(Expressions.MessageNumber)) === null || _f === void 0 ? void 0 : _f.concatTokens();
122
127
  if (number === undefined) {
123
- const num = (_f = node.findExpressionAfterToken("NUMBER")) === null || _f === void 0 ? void 0 : _f.concatTokens();
128
+ const num = (_g = node.findExpressionAfterToken("NUMBER")) === null || _g === void 0 ? void 0 : _g.concatTokens();
124
129
  if (num === null || num === void 0 ? void 0 : num.startsWith("'")) {
125
130
  number = num.substring(1, num.length - 1).toUpperCase();
126
131
  }
@@ -78,7 +78,7 @@ class Registry {
78
78
  }
79
79
  static abaplintVersion() {
80
80
  // magic, see build script "version.js"
81
- return "2.120.106";
81
+ return "2.120.107";
82
82
  }
83
83
  getDDICReferences() {
84
84
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.120.106",
3
+ "version": "2.120.107",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",