@abaplint/runtime 2.13.76 → 2.13.77
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.
|
@@ -60,8 +60,13 @@ function assign(input) {
|
|
|
60
60
|
const componentName = sourceContainer instanceof types_1.Structure
|
|
61
61
|
? s.toLowerCase()
|
|
62
62
|
: s.toLowerCase().replace(/[~\\/]/g, "$");
|
|
63
|
+
let next = source[componentName];
|
|
64
|
+
if (next === undefined && source.FRIENDS_ACCESS_INSTANCE !== undefined) {
|
|
65
|
+
// it might be private, note this currently does not respect encapsulation properly
|
|
66
|
+
next = source.FRIENDS_ACCESS_INSTANCE[componentName];
|
|
67
|
+
}
|
|
63
68
|
// @ts-ignore
|
|
64
|
-
input.dynamicSource =
|
|
69
|
+
input.dynamicSource = next;
|
|
65
70
|
}
|
|
66
71
|
}
|
|
67
72
|
}
|
|
@@ -7,6 +7,7 @@ const hex_1 = require("./hex");
|
|
|
7
7
|
const float_1 = require("./float");
|
|
8
8
|
const data_reference_1 = require("./data_reference");
|
|
9
9
|
const hex_uint8_1 = require("./hex_uint8");
|
|
10
|
+
const date_1 = require("./date");
|
|
10
11
|
class FieldSymbol {
|
|
11
12
|
pointer;
|
|
12
13
|
casting;
|
|
@@ -39,7 +40,7 @@ class FieldSymbol {
|
|
|
39
40
|
return this.pointer !== undefined;
|
|
40
41
|
}
|
|
41
42
|
getPointer() {
|
|
42
|
-
if (this.
|
|
43
|
+
if (this.needsReinterpretation()) {
|
|
43
44
|
// todo, this wont work for everything, eg changing CASTING'ed values
|
|
44
45
|
return this.get();
|
|
45
46
|
}
|
|
@@ -58,7 +59,7 @@ class FieldSymbol {
|
|
|
58
59
|
return this.pointer?.clear();
|
|
59
60
|
}
|
|
60
61
|
get() {
|
|
61
|
-
if (this.
|
|
62
|
+
if (this.needsReinterpretation()) {
|
|
62
63
|
if (this.type instanceof hex_1.Hex || this.type instanceof hex_uint8_1.HexUInt8) {
|
|
63
64
|
const pt = this.pointer;
|
|
64
65
|
if (pt instanceof float_1.Float) {
|
|
@@ -96,7 +97,7 @@ class FieldSymbol {
|
|
|
96
97
|
return this.pointer?.getArrayLength();
|
|
97
98
|
}
|
|
98
99
|
set(value) {
|
|
99
|
-
if (this.
|
|
100
|
+
if (this.needsReinterpretation()) {
|
|
100
101
|
if (this.type instanceof hex_1.Hex || this.type instanceof hex_uint8_1.HexUInt8) {
|
|
101
102
|
const pt = this.pointer;
|
|
102
103
|
if (pt instanceof float_1.Float) {
|
|
@@ -112,6 +113,11 @@ class FieldSymbol {
|
|
|
112
113
|
getOffset(input) {
|
|
113
114
|
return this.getPointer().getOffset(input);
|
|
114
115
|
}
|
|
116
|
+
needsReinterpretation() {
|
|
117
|
+
// Date-to-date CASTING shares the original storage and must retain the Date
|
|
118
|
+
// wrapper so arithmetic uses day counts instead of parsing YYYYMMDD as a number.
|
|
119
|
+
return this.casting && !(this.type instanceof date_1.Date && this.pointer instanceof date_1.Date);
|
|
120
|
+
}
|
|
115
121
|
}
|
|
116
122
|
exports.FieldSymbol = FieldSymbol;
|
|
117
123
|
//# sourceMappingURL=field_symbol.js.map
|