@abaplint/core 2.95.22 → 2.95.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.
|
@@ -8,7 +8,7 @@ const basic_types_1 = require("../basic_types");
|
|
|
8
8
|
const unknown_type_1 = require("../../types/basic/unknown_type");
|
|
9
9
|
const _reference_1 = require("../_reference");
|
|
10
10
|
class InlineFieldDefinition {
|
|
11
|
-
runSyntax(node, scope, filename) {
|
|
11
|
+
runSyntax(node, scope, filename, targetType) {
|
|
12
12
|
var _a;
|
|
13
13
|
let type = undefined;
|
|
14
14
|
const field = (_a = node.findDirectExpression(Expressions.Field)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
|
|
@@ -23,6 +23,9 @@ class InlineFieldDefinition {
|
|
|
23
23
|
if (typeName) {
|
|
24
24
|
type = new basic_types_1.BasicTypes(filename, scope).parseType(typeName);
|
|
25
25
|
}
|
|
26
|
+
if (targetType !== undefined) {
|
|
27
|
+
type = targetType;
|
|
28
|
+
}
|
|
26
29
|
if (type === undefined) {
|
|
27
30
|
type = new unknown_type_1.UnknownType("InlineFieldDefinition, fallback");
|
|
28
31
|
}
|
|
@@ -10,7 +10,7 @@ const reduce_next_1 = require("./reduce_next");
|
|
|
10
10
|
const let_1 = require("./let");
|
|
11
11
|
const _scope_type_1 = require("../_scope_type");
|
|
12
12
|
class ReduceBody {
|
|
13
|
-
runSyntax(node, scope, filename) {
|
|
13
|
+
runSyntax(node, scope, filename, targetType) {
|
|
14
14
|
if (node === undefined) {
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
@@ -25,7 +25,7 @@ class ReduceBody {
|
|
|
25
25
|
scope.push(_scope_type_1.ScopeType.Let, "LET", node.getFirstToken().getStart(), filename);
|
|
26
26
|
scoped = true;
|
|
27
27
|
}
|
|
28
|
-
const found = new inline_field_definition_1.InlineFieldDefinition().runSyntax(i, scope, filename);
|
|
28
|
+
const found = new inline_field_definition_1.InlineFieldDefinition().runSyntax(i, scope, filename, targetType);
|
|
29
29
|
if (found && first === undefined) {
|
|
30
30
|
first = found;
|
|
31
31
|
}
|
|
@@ -64,7 +64,7 @@ class Source {
|
|
|
64
64
|
case "REDUCE":
|
|
65
65
|
{
|
|
66
66
|
const foundType = this.determineType(node, scope, filename, targetType);
|
|
67
|
-
const bodyType = new reduce_body_1.ReduceBody().runSyntax(node.findDirectExpression(Expressions.ReduceBody), scope, filename);
|
|
67
|
+
const bodyType = new reduce_body_1.ReduceBody().runSyntax(node.findDirectExpression(Expressions.ReduceBody), scope, filename, foundType);
|
|
68
68
|
if (foundType === undefined) {
|
|
69
69
|
this.addIfInferred(node, scope, filename, bodyType);
|
|
70
70
|
}
|
package/build/src/registry.js
CHANGED