@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
|
|
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
|
-
|
|
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 = (
|
|
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 = (
|
|
121
|
-
let number = (
|
|
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 = (
|
|
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
|
}
|
package/build/src/registry.js
CHANGED