@abaplint/cli 2.102.29 → 2.102.31
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
|
@@ -9613,7 +9613,7 @@ class CallFunction {
|
|
|
9613
9613
|
const update = (0, combi_1.verNot)(version_1.Version.Cloud, (0, combi_1.str)("IN UPDATE TASK"));
|
|
9614
9614
|
const unit = (0, combi_1.seq)("UNIT", expressions_1.Source);
|
|
9615
9615
|
const background = (0, combi_1.verNot)(version_1.Version.Cloud, (0, combi_1.seq)("IN BACKGROUND", (0, combi_1.altPrio)("TASK", unit)));
|
|
9616
|
-
const calling = (0, combi_1.seq)("CALLING", expressions_1.
|
|
9616
|
+
const calling = (0, combi_1.seq)("CALLING", expressions_1.MethodSource, "ON END OF TASK");
|
|
9617
9617
|
const performing = (0, combi_1.seq)("PERFORMING", expressions_1.FormName, "ON END OF TASK");
|
|
9618
9618
|
const separate = (0, combi_1.str)("AS SEPARATE UNIT");
|
|
9619
9619
|
const keeping = (0, combi_1.str)("KEEPING LOGICAL UNIT OF WORK");
|
|
@@ -20516,6 +20516,9 @@ class CurrentScope {
|
|
|
20516
20516
|
if (this.current.getData().types[upper] !== undefined) {
|
|
20517
20517
|
throw new Error(`Type name "${name}" already defined`);
|
|
20518
20518
|
}
|
|
20519
|
+
else if (this.isOO() && this.current.getData().vars[upper] !== undefined) {
|
|
20520
|
+
throw new Error(`"${name}" already defined`);
|
|
20521
|
+
}
|
|
20519
20522
|
this.current.getData().types[upper] = type;
|
|
20520
20523
|
}
|
|
20521
20524
|
addExtraLikeType(type) {
|
|
@@ -20565,6 +20568,9 @@ class CurrentScope {
|
|
|
20565
20568
|
if (this.current.getData().vars[upper] !== undefined) {
|
|
20566
20569
|
throw new Error(`Variable name "${name}" already defined`);
|
|
20567
20570
|
}
|
|
20571
|
+
else if (this.isOO() && this.current.getData().types[upper] !== undefined) {
|
|
20572
|
+
throw new Error(`"${name}" already defined`);
|
|
20573
|
+
}
|
|
20568
20574
|
this.current.getData().vars[upper] = identifier;
|
|
20569
20575
|
}
|
|
20570
20576
|
addIdentifier(identifier) {
|
|
@@ -20831,7 +20837,7 @@ class CurrentScope {
|
|
|
20831
20837
|
while (curr !== undefined) {
|
|
20832
20838
|
const stype = curr.getIdentifier().stype;
|
|
20833
20839
|
if (stype === _scope_type_1.ScopeType.ClassDefinition
|
|
20834
|
-
|| stype ===
|
|
20840
|
+
// || stype === ScopeType.ClassImplementation
|
|
20835
20841
|
|| stype === _scope_type_1.ScopeType.Interface) {
|
|
20836
20842
|
return true;
|
|
20837
20843
|
}
|
|
@@ -21475,6 +21481,7 @@ exports.TypeUtils = void 0;
|
|
|
21475
21481
|
const types_1 = __webpack_require__(/*! ../types */ "./node_modules/@abaplint/core/build/src/abap/types/index.js");
|
|
21476
21482
|
const basic_1 = __webpack_require__(/*! ../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
|
|
21477
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
|
|
21478
21485
|
class TypeUtils {
|
|
21479
21486
|
constructor(scope) {
|
|
21480
21487
|
this.scope = scope;
|
|
@@ -21769,6 +21776,11 @@ class TypeUtils {
|
|
|
21769
21776
|
return false;
|
|
21770
21777
|
}
|
|
21771
21778
|
}
|
|
21779
|
+
else if (source instanceof basic_1.IntegerType) {
|
|
21780
|
+
if (target instanceof basic_1.StringType || target instanceof basic_1.Integer8Type) {
|
|
21781
|
+
return false;
|
|
21782
|
+
}
|
|
21783
|
+
}
|
|
21772
21784
|
else if (source instanceof basic_1.FloatType) {
|
|
21773
21785
|
if (target instanceof basic_1.IntegerType) {
|
|
21774
21786
|
return false;
|
|
@@ -29315,6 +29327,7 @@ const target_1 = __webpack_require__(/*! ../expressions/target */ "./node_module
|
|
|
29315
29327
|
const fstarget_1 = __webpack_require__(/*! ../expressions/fstarget */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/fstarget.js");
|
|
29316
29328
|
const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
|
|
29317
29329
|
const inline_data_1 = __webpack_require__(/*! ../expressions/inline_data */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js");
|
|
29330
|
+
const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js");
|
|
29318
29331
|
class InsertInternal {
|
|
29319
29332
|
runSyntax(node, scope, filename) {
|
|
29320
29333
|
let targetType;
|
|
@@ -29322,7 +29335,7 @@ class InsertInternal {
|
|
|
29322
29335
|
if (t) {
|
|
29323
29336
|
targetType = new target_1.Target().runSyntax(t, scope, filename);
|
|
29324
29337
|
}
|
|
29325
|
-
if (targetType instanceof basic_1.TableType) {
|
|
29338
|
+
if (targetType instanceof basic_1.TableType && node.findDirectTokenByText("LINES") === undefined) {
|
|
29326
29339
|
targetType = targetType.getRowType();
|
|
29327
29340
|
}
|
|
29328
29341
|
let source = node.findDirectExpression(Expressions.SimpleSource4);
|
|
@@ -29340,6 +29353,9 @@ class InsertInternal {
|
|
|
29340
29353
|
new fstarget_1.FSTarget().runSyntax(afterAssigning, scope, filename, sourceType);
|
|
29341
29354
|
}
|
|
29342
29355
|
}
|
|
29356
|
+
if (new _type_utils_1.TypeUtils(scope).isAssignableStrict(sourceType, targetType) === false) {
|
|
29357
|
+
throw new Error("Types not compatible");
|
|
29358
|
+
}
|
|
29343
29359
|
const afterInto = node.findExpressionAfterToken("INTO");
|
|
29344
29360
|
if ((afterInto === null || afterInto === void 0 ? void 0 : afterInto.get()) instanceof Expressions.Target && sourceType) {
|
|
29345
29361
|
const inline = afterInto.findDirectExpression(Expressions.InlineData);
|
|
@@ -48743,7 +48759,7 @@ class Registry {
|
|
|
48743
48759
|
}
|
|
48744
48760
|
static abaplintVersion() {
|
|
48745
48761
|
// magic, see build script "version.sh"
|
|
48746
|
-
return "2.102.
|
|
48762
|
+
return "2.102.31";
|
|
48747
48763
|
}
|
|
48748
48764
|
getDDICReferences() {
|
|
48749
48765
|
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.31",
|
|
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.31",
|
|
42
42
|
"@types/chai": "^4.3.5",
|
|
43
43
|
"@types/glob": "^7.2.0",
|
|
44
44
|
"@types/minimist": "^1.2.2",
|