@abaplint/core 2.102.33 → 2.102.34
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/abaplint.d.ts
CHANGED
|
@@ -1345,6 +1345,7 @@ export declare class CurrentScope {
|
|
|
1345
1345
|
getType(): ScopeType;
|
|
1346
1346
|
push(stype: ScopeType, sname: string, start: Position, filename: string): void;
|
|
1347
1347
|
isOO(): boolean;
|
|
1348
|
+
isGlobalOO(): boolean;
|
|
1348
1349
|
isTypePool(): boolean;
|
|
1349
1350
|
setAllowHeaderUse(name: string): void;
|
|
1350
1351
|
isAllowHeaderUse(name: string): boolean;
|
|
@@ -387,6 +387,9 @@ class CurrentScope {
|
|
|
387
387
|
}
|
|
388
388
|
return false;
|
|
389
389
|
}
|
|
390
|
+
isGlobalOO() {
|
|
391
|
+
return this.parentObj.getType() === "INTF" || this.parentObj.getType() === "CLAS";
|
|
392
|
+
}
|
|
390
393
|
isTypePool() {
|
|
391
394
|
var _a;
|
|
392
395
|
return ((_a = this.current) === null || _a === void 0 ? void 0 : _a.getIdentifier().filename.endsWith(".type.abap")) === true || false;
|
|
@@ -35,7 +35,7 @@ class InsertInternal {
|
|
|
35
35
|
new fstarget_1.FSTarget().runSyntax(afterAssigning, scope, filename, sourceType);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
if (
|
|
38
|
+
if (node.findDirectTokenByText("INITIAL") === undefined
|
|
39
39
|
&& new _type_utils_1.TypeUtils(scope).isAssignableStrict(sourceType, targetType) === false) {
|
|
40
40
|
throw new Error("Types not compatible");
|
|
41
41
|
}
|
|
@@ -18,6 +18,13 @@ class Type {
|
|
|
18
18
|
&& (found === null || found === void 0 ? void 0 : found.getType().containsVoid()) === false) {
|
|
19
19
|
throw new Error("TYPES definition cannot be generic, " + found.getName());
|
|
20
20
|
}
|
|
21
|
+
if (scope.isGlobalOO() && found.getType() instanceof basic_1.PackedType) {
|
|
22
|
+
const concat = node.concatTokens().toUpperCase();
|
|
23
|
+
if ((concat.includes(" TYPE P ") || concat.includes(" TYPE P."))
|
|
24
|
+
&& concat.includes(" DECIMALS ") === false) {
|
|
25
|
+
throw new Error("Specify DECIMALS in OO context for packed");
|
|
26
|
+
}
|
|
27
|
+
}
|
|
21
28
|
return found;
|
|
22
29
|
}
|
|
23
30
|
const fallback = node.findFirstExpression(Expressions.NamespaceSimpleName);
|
package/build/src/registry.js
CHANGED