@abaplint/cli 2.102.30 → 2.102.32
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.
- package/build/cli.js +20 -4
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -21481,6 +21481,7 @@ exports.TypeUtils = void 0;
|
|
|
21481
21481
|
const types_1 = __webpack_require__(/*! ../types */ "./node_modules/@abaplint/core/build/src/abap/types/index.js");
|
|
21482
21482
|
const basic_1 = __webpack_require__(/*! ../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
|
|
21483
21483
|
const cgeneric_type_1 = __webpack_require__(/*! ../types/basic/cgeneric_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/cgeneric_type.js");
|
|
21484
|
+
// todo: refactor to static? for performance
|
|
21484
21485
|
class TypeUtils {
|
|
21485
21486
|
constructor(scope) {
|
|
21486
21487
|
this.scope = scope;
|
|
@@ -21687,7 +21688,7 @@ class TypeUtils {
|
|
|
21687
21688
|
return false;
|
|
21688
21689
|
}
|
|
21689
21690
|
isAssignableStrict(source, target, calculated = false) {
|
|
21690
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
21691
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
21691
21692
|
/*
|
|
21692
21693
|
console.dir(source);
|
|
21693
21694
|
console.dir(target);
|
|
@@ -21775,6 +21776,17 @@ class TypeUtils {
|
|
|
21775
21776
|
return false;
|
|
21776
21777
|
}
|
|
21777
21778
|
}
|
|
21779
|
+
else if (source instanceof basic_1.IntegerType) {
|
|
21780
|
+
if (target instanceof basic_1.StringType) {
|
|
21781
|
+
return false;
|
|
21782
|
+
}
|
|
21783
|
+
else if (target instanceof basic_1.Integer8Type) {
|
|
21784
|
+
if (((_h = source.getAbstractTypeData()) === null || _h === void 0 ? void 0 : _h.derivedFromConstant) === true) {
|
|
21785
|
+
return true;
|
|
21786
|
+
}
|
|
21787
|
+
return false;
|
|
21788
|
+
}
|
|
21789
|
+
}
|
|
21778
21790
|
else if (source instanceof basic_1.FloatType) {
|
|
21779
21791
|
if (target instanceof basic_1.IntegerType) {
|
|
21780
21792
|
return false;
|
|
@@ -23430,7 +23442,7 @@ class Constant {
|
|
|
23430
23442
|
runSyntax(node) {
|
|
23431
23443
|
// todo: ConcatenatedConstant is not used?
|
|
23432
23444
|
if (node.findDirectExpression(expressions_1.Integer)) {
|
|
23433
|
-
return basic_1.IntegerType.get();
|
|
23445
|
+
return basic_1.IntegerType.get({ derivedFromConstant: true });
|
|
23434
23446
|
}
|
|
23435
23447
|
else if (node.getFirstToken().getStr().startsWith("'")) {
|
|
23436
23448
|
let len = node.getFirstToken().getStr().length - 2;
|
|
@@ -29321,6 +29333,7 @@ const target_1 = __webpack_require__(/*! ../expressions/target */ "./node_module
|
|
|
29321
29333
|
const fstarget_1 = __webpack_require__(/*! ../expressions/fstarget */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/fstarget.js");
|
|
29322
29334
|
const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
|
|
29323
29335
|
const inline_data_1 = __webpack_require__(/*! ../expressions/inline_data */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js");
|
|
29336
|
+
const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js");
|
|
29324
29337
|
class InsertInternal {
|
|
29325
29338
|
runSyntax(node, scope, filename) {
|
|
29326
29339
|
let targetType;
|
|
@@ -29328,7 +29341,7 @@ class InsertInternal {
|
|
|
29328
29341
|
if (t) {
|
|
29329
29342
|
targetType = new target_1.Target().runSyntax(t, scope, filename);
|
|
29330
29343
|
}
|
|
29331
|
-
if (targetType instanceof basic_1.TableType) {
|
|
29344
|
+
if (targetType instanceof basic_1.TableType && node.findDirectTokenByText("LINES") === undefined) {
|
|
29332
29345
|
targetType = targetType.getRowType();
|
|
29333
29346
|
}
|
|
29334
29347
|
let source = node.findDirectExpression(Expressions.SimpleSource4);
|
|
@@ -29346,6 +29359,9 @@ class InsertInternal {
|
|
|
29346
29359
|
new fstarget_1.FSTarget().runSyntax(afterAssigning, scope, filename, sourceType);
|
|
29347
29360
|
}
|
|
29348
29361
|
}
|
|
29362
|
+
if (new _type_utils_1.TypeUtils(scope).isAssignableStrict(sourceType, targetType) === false) {
|
|
29363
|
+
throw new Error("Types not compatible");
|
|
29364
|
+
}
|
|
29349
29365
|
const afterInto = node.findExpressionAfterToken("INTO");
|
|
29350
29366
|
if ((afterInto === null || afterInto === void 0 ? void 0 : afterInto.get()) instanceof Expressions.Target && sourceType) {
|
|
29351
29367
|
const inline = afterInto.findDirectExpression(Expressions.InlineData);
|
|
@@ -48749,7 +48765,7 @@ class Registry {
|
|
|
48749
48765
|
}
|
|
48750
48766
|
static abaplintVersion() {
|
|
48751
48767
|
// magic, see build script "version.sh"
|
|
48752
|
-
return "2.102.
|
|
48768
|
+
return "2.102.32";
|
|
48753
48769
|
}
|
|
48754
48770
|
getDDICReferences() {
|
|
48755
48771
|
return this.ddicReferences;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.102.
|
|
3
|
+
"version": "2.102.32",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://abaplint.org",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@abaplint/core": "^2.102.
|
|
41
|
+
"@abaplint/core": "^2.102.32",
|
|
42
42
|
"@types/chai": "^4.3.5",
|
|
43
43
|
"@types/glob": "^7.2.0",
|
|
44
44
|
"@types/minimist": "^1.2.2",
|