@abaplint/cli 2.120.21 → 2.120.23
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 +17 -7
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -27635,6 +27635,9 @@ class TypeUtils {
|
|
|
27635
27635
|
&& (target instanceof basic_1.XStringType || target instanceof basic_1.XSequenceType)) {
|
|
27636
27636
|
return false;
|
|
27637
27637
|
}
|
|
27638
|
+
if (calculated && source instanceof basic_1.IntegerType && target instanceof basic_1.DateType) {
|
|
27639
|
+
return false;
|
|
27640
|
+
}
|
|
27638
27641
|
if (target instanceof basic_1.NumericType
|
|
27639
27642
|
&& (source instanceof basic_1.CharacterType || source instanceof basic_1.StringType)
|
|
27640
27643
|
&& ((_a = source.getAbstractTypeData()) === null || _a === void 0 ? void 0 : _a.derivedFromConstant) === true) {
|
|
@@ -39053,7 +39056,7 @@ class CreateObject {
|
|
|
39053
39056
|
this.validateParameters(cdef, node, input);
|
|
39054
39057
|
}
|
|
39055
39058
|
static checkInstantiationAllowed(cdef, input) {
|
|
39056
|
-
var _a, _b, _c
|
|
39059
|
+
var _a, _b, _c;
|
|
39057
39060
|
const createVis = cdef.getCreateVisibility();
|
|
39058
39061
|
if (createVis === visibility_1.Visibility.Public) {
|
|
39059
39062
|
return undefined;
|
|
@@ -39070,23 +39073,30 @@ class CreateObject {
|
|
|
39070
39073
|
input.scope.isLocalFriend(cdef.getName(), enclosingClass)) {
|
|
39071
39074
|
return undefined;
|
|
39072
39075
|
}
|
|
39076
|
+
const enclosingDefinition = input.scope.findClassDefinition(enclosingClass);
|
|
39077
|
+
if (enclosingDefinition !== undefined) {
|
|
39078
|
+
const implementedInterfaces = new _object_oriented_1.ObjectOriented(input.scope).findInterfaces(enclosingDefinition);
|
|
39079
|
+
if (cdef.getFriends().some(friend => implementedInterfaces.some(implemented => implemented.name.toUpperCase() === friend.toUpperCase()))) {
|
|
39080
|
+
return undefined;
|
|
39081
|
+
}
|
|
39082
|
+
}
|
|
39073
39083
|
// subclasses of friends also have friendship
|
|
39074
|
-
let enclosingSup =
|
|
39084
|
+
let enclosingSup = enclosingDefinition === null || enclosingDefinition === void 0 ? void 0 : enclosingDefinition.getSuperClass();
|
|
39075
39085
|
while (enclosingSup !== undefined) {
|
|
39076
39086
|
if (cdef.getFriends().some(f => f.toUpperCase() === enclosingSup.toUpperCase()) ||
|
|
39077
39087
|
input.scope.isLocalFriend(cdef.getName(), enclosingSup)) {
|
|
39078
39088
|
return undefined;
|
|
39079
39089
|
}
|
|
39080
|
-
enclosingSup = (
|
|
39090
|
+
enclosingSup = (_a = input.scope.findClassDefinition(enclosingSup)) === null || _a === void 0 ? void 0 : _a.getSuperClass();
|
|
39081
39091
|
}
|
|
39082
39092
|
if (createVis === visibility_1.Visibility.Protected) {
|
|
39083
39093
|
// subclasses are also allowed
|
|
39084
|
-
let sup = (
|
|
39094
|
+
let sup = (_b = input.scope.findClassDefinition(enclosingClass)) === null || _b === void 0 ? void 0 : _b.getSuperClass();
|
|
39085
39095
|
while (sup !== undefined) {
|
|
39086
39096
|
if (sup.toUpperCase() === cdef.getName().toUpperCase()) {
|
|
39087
39097
|
return undefined;
|
|
39088
39098
|
}
|
|
39089
|
-
sup = (
|
|
39099
|
+
sup = (_c = input.scope.findClassDefinition(sup)) === null || _c === void 0 ? void 0 : _c.getSuperClass();
|
|
39090
39100
|
}
|
|
39091
39101
|
}
|
|
39092
39102
|
return cdef.getName() + " cannot be instantiated, class is defined as " +
|
|
@@ -42397,7 +42407,7 @@ class MethodImplementation {
|
|
|
42397
42407
|
return;
|
|
42398
42408
|
}
|
|
42399
42409
|
const start = node.getFirstToken().getStart();
|
|
42400
|
-
if ((methodDefinition === null || methodDefinition === void 0 ? void 0 : methodDefinition.isStatic()) === false) {
|
|
42410
|
+
if ((methodDefinition === null || methodDefinition === void 0 ? void 0 : methodDefinition.isStatic()) === false || methodDefinition === undefined) {
|
|
42401
42411
|
input.scope.push(_scope_type_1.ScopeType.MethodInstance, methodName, start, input.filename);
|
|
42402
42412
|
input.scope.addList(classDefinition.getAttributes().getInstance());
|
|
42403
42413
|
}
|
|
@@ -69661,7 +69671,7 @@ class Registry {
|
|
|
69661
69671
|
}
|
|
69662
69672
|
static abaplintVersion() {
|
|
69663
69673
|
// magic, see build script "version.js"
|
|
69664
|
-
return "2.120.
|
|
69674
|
+
return "2.120.23";
|
|
69665
69675
|
}
|
|
69666
69676
|
getDDICReferences() {
|
|
69667
69677
|
return this.ddicReferences;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.120.
|
|
3
|
+
"version": "2.120.23",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"homepage": "https://abaplint.org",
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@abaplint/core": "^2.120.
|
|
42
|
+
"@abaplint/core": "^2.120.23",
|
|
43
43
|
"@types/chai": "^4.3.20",
|
|
44
44
|
"@types/minimist": "^1.2.5",
|
|
45
45
|
"@types/mocha": "^10.0.10",
|