@abaplint/core 2.119.7 → 2.119.9
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.
|
@@ -342,7 +342,7 @@ class Select {
|
|
|
342
342
|
if (type === undefined) {
|
|
343
343
|
return basic_1.VoidType.get("SELECT_todo6");
|
|
344
344
|
}
|
|
345
|
-
components.push({ name: field.code, type });
|
|
345
|
+
components.push({ name: field.as || field.code, type });
|
|
346
346
|
}
|
|
347
347
|
return new basic_1.TableType(new basic_1.StructureType(components), tableOptions, undefined);
|
|
348
348
|
}
|
|
@@ -39,6 +39,7 @@ const assert_error_1 = require("../assert_error");
|
|
|
39
39
|
// TODO: refactor all these method parameters to objects, this is getting messy
|
|
40
40
|
class Source {
|
|
41
41
|
static runSyntax(node, input, targetType, writeReference = false, allowGenericDeference = false) {
|
|
42
|
+
var _a;
|
|
42
43
|
if (node === undefined) {
|
|
43
44
|
return undefined;
|
|
44
45
|
}
|
|
@@ -116,12 +117,13 @@ class Source {
|
|
|
116
117
|
{
|
|
117
118
|
const foundType = this.determineType(node, input, targetType);
|
|
118
119
|
const bodyType = conv_body_1.ConvBody.runSyntax(node.findDirectExpression(Expressions.ConvBody), input);
|
|
120
|
+
const inferred = (_a = node.findDirectExpression(Expressions.TypeNameOrInfer)) === null || _a === void 0 ? void 0 : _a.concatTokens();
|
|
119
121
|
if (new _type_utils_1.TypeUtils(input.scope).isConvable(foundType, bodyType) === false) {
|
|
120
122
|
const message = `CONV: Types not compatible, ${foundType === null || foundType === void 0 ? void 0 : foundType.constructor.name}, ${bodyType === null || bodyType === void 0 ? void 0 : bodyType.constructor.name}`;
|
|
121
123
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
122
124
|
return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
123
125
|
}
|
|
124
|
-
else if (foundType === null || foundType === void 0 ? void 0 : foundType.isGeneric()) {
|
|
126
|
+
else if ((foundType === null || foundType === void 0 ? void 0 : foundType.isGeneric()) && inferred !== "#") {
|
|
125
127
|
const message = "Cannot CONV to generic type";
|
|
126
128
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
127
129
|
return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
package/build/src/registry.js
CHANGED