@abaplint/core 2.119.64 → 2.119.66
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.
|
@@ -323,7 +323,8 @@ class TypeUtils {
|
|
|
323
323
|
console.dir(target);
|
|
324
324
|
console.dir(calculated);
|
|
325
325
|
*/
|
|
326
|
-
if (calculated && source instanceof basic_1.StringType
|
|
326
|
+
if (calculated && source instanceof basic_1.StringType
|
|
327
|
+
&& (target instanceof basic_1.XStringType || target instanceof basic_1.XSequenceType)) {
|
|
327
328
|
return false;
|
|
328
329
|
}
|
|
329
330
|
if (calculated) {
|
|
@@ -344,7 +345,7 @@ class TypeUtils {
|
|
|
344
345
|
}
|
|
345
346
|
else if (target instanceof basic_1.XStringType) {
|
|
346
347
|
if (((_c = source.getAbstractTypeData()) === null || _c === void 0 ? void 0 : _c.derivedFromConstant) === true) {
|
|
347
|
-
return
|
|
348
|
+
return (node === null || node === void 0 ? void 0 : node.concatTokens()) !== "''";
|
|
348
349
|
}
|
|
349
350
|
return false;
|
|
350
351
|
}
|
|
@@ -38,6 +38,7 @@ const Expressions = __importStar(require("../../2_statements/expressions"));
|
|
|
38
38
|
const _typed_identifier_1 = require("../../types/_typed_identifier");
|
|
39
39
|
const basic_1 = require("../../types/basic");
|
|
40
40
|
const basic_types_1 = require("../basic_types");
|
|
41
|
+
const _syntax_input_1 = require("../_syntax_input");
|
|
41
42
|
const assert_error_1 = require("../assert_error");
|
|
42
43
|
class MethodDefReturning {
|
|
43
44
|
static runSyntax(node, input, meta) {
|
|
@@ -50,8 +51,11 @@ class MethodDefReturning {
|
|
|
50
51
|
throw new assert_error_1.AssertError("method_parameter.ts, unexpected structure");
|
|
51
52
|
}
|
|
52
53
|
let found = new basic_types_1.BasicTypes(input).parseType(type);
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
const message = "RETURNING parameter must be fully specified";
|
|
55
|
+
const typeText = type.concatTokens().toUpperCase();
|
|
56
|
+
if ((found === null || found === void 0 ? void 0 : found.isGeneric()) === true || typeText === "TYPE X" || typeText === "TYPE C") {
|
|
57
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, type.getFirstToken(), message));
|
|
58
|
+
found = new basic_1.UnknownType(message);
|
|
55
59
|
}
|
|
56
60
|
if (found) {
|
|
57
61
|
return new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), input.filename, found, meta);
|
|
@@ -45,6 +45,11 @@ class Concatenate {
|
|
|
45
45
|
runSyntax(node, input) {
|
|
46
46
|
const byteMode = node.findDirectTokenByText("BYTE") !== undefined;
|
|
47
47
|
const linesMode = node.findDirectTokenByText("LINES") !== undefined;
|
|
48
|
+
if (node.findFirstExpression(Expressions.TableExpression) !== undefined) {
|
|
49
|
+
const message = "CONCATENATE with table expression not possible";
|
|
50
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
48
53
|
const target = node.findFirstExpression(Expressions.Target);
|
|
49
54
|
const inline = target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData);
|
|
50
55
|
if (inline) {
|
package/build/src/registry.js
CHANGED
|
@@ -331,6 +331,18 @@ Make sure to test the downported code, it might not always be completely correct
|
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
|
+
// INTO after WHERE parses as a valid SELECT in the low version, but is only allowed in
|
|
335
|
+
// strict SQL syntax, so move it also when the statement is no longer Unknown
|
|
336
|
+
if (ret.length === 0) {
|
|
337
|
+
for (let i = 0; i < lowStatements.length; i++) {
|
|
338
|
+
const low = lowStatements[i];
|
|
339
|
+
const high = highStatements[i];
|
|
340
|
+
const issue = this.downportSQLMoveInto(low, high, lowFile, highSyntax);
|
|
341
|
+
if (issue) {
|
|
342
|
+
ret.push(issue);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
334
346
|
}
|
|
335
347
|
return ret;
|
|
336
348
|
}
|
|
@@ -574,10 +586,14 @@ Make sure to test the downported code, it might not always be completely correct
|
|
|
574
586
|
return undefined;
|
|
575
587
|
}
|
|
576
588
|
//////////////////////////////////////////
|
|
577
|
-
/** move INTO from after WHERE to after FROM
|
|
589
|
+
/** move INTO from after WHERE to after FROM,
|
|
590
|
+
* note that INTO after WHERE is only valid in strict SQL syntax, so it must be moved when
|
|
591
|
+
* downporting; this can happen both while the statement is still Unknown(from the main loop)
|
|
592
|
+
* and after the @ and FIELDS have been removed, leaving a SELECT that parses in the low version */
|
|
578
593
|
downportSQLMoveInto(low, high, lowFile, _highSyntax) {
|
|
579
594
|
var _a;
|
|
580
|
-
if (!(
|
|
595
|
+
if (!(high.get() instanceof Statements.Select)
|
|
596
|
+
&& !(high.get() instanceof Statements.SelectLoop)) {
|
|
581
597
|
return undefined;
|
|
582
598
|
}
|
|
583
599
|
// note: SQLCond is also used in JOIN(FROM) conditions
|
|
@@ -585,6 +601,7 @@ Make sure to test the downported code, it might not always be completely correct
|
|
|
585
601
|
if (where === undefined) {
|
|
586
602
|
return undefined;
|
|
587
603
|
}
|
|
604
|
+
// the FIELDS list sits between FROM and WHERE, wait for it to be removed first
|
|
588
605
|
if (high.findFirstExpression(Expressions.SQLFields) !== undefined) {
|
|
589
606
|
return undefined;
|
|
590
607
|
}
|