@abaplint/core 2.113.233 → 2.113.234
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.
|
@@ -14,11 +14,19 @@ class InlineData {
|
|
|
14
14
|
if (type instanceof basic_1.CSequenceType || type instanceof basic_1.CLikeType) {
|
|
15
15
|
type = basic_1.StringType.get();
|
|
16
16
|
}
|
|
17
|
+
else if (type instanceof basic_1.XSequenceType) {
|
|
18
|
+
type = basic_1.StringType.get();
|
|
19
|
+
}
|
|
17
20
|
else if (type instanceof basic_1.CGenericType) {
|
|
18
21
|
const message = "InlineData, generic type C cannot be used for inferred type";
|
|
19
22
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
20
23
|
return;
|
|
21
24
|
}
|
|
25
|
+
if (type.isGeneric()) {
|
|
26
|
+
const message = "DATA definition cannot be generic, " + type.constructor.name;
|
|
27
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
28
|
+
type = basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
29
|
+
}
|
|
22
30
|
const identifier = new _typed_identifier_1.TypedIdentifier(token, input.filename, type, ["inline" /* IdentifierMeta.InlineDefinition */]);
|
|
23
31
|
input.scope.addIdentifier(identifier);
|
|
24
32
|
input.scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, input.filename);
|
|
@@ -130,15 +130,20 @@ class Source {
|
|
|
130
130
|
const s = Source.runSyntax(node.findDirectExpression(Expressions.Source), input);
|
|
131
131
|
/*
|
|
132
132
|
console.dir(node.concatTokens());
|
|
133
|
-
console.dir(targetType);
|
|
134
|
-
console.dir(foundType);
|
|
135
133
|
console.dir(s);
|
|
134
|
+
console.dir(foundType);
|
|
135
|
+
console.dir(targetType);
|
|
136
136
|
*/
|
|
137
137
|
if (foundType && foundType.isGeneric() && s) {
|
|
138
138
|
foundType = new basic_1.DataReference(s);
|
|
139
139
|
}
|
|
140
140
|
else if (foundType === undefined && s) {
|
|
141
|
-
|
|
141
|
+
if (s instanceof basic_1.AnyType) {
|
|
142
|
+
foundType = new basic_1.DataReference(basic_1.VoidType.get("REF-ANY"));
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
foundType = new basic_1.DataReference(s);
|
|
146
|
+
}
|
|
142
147
|
}
|
|
143
148
|
else if (foundType && targetType === undefined) {
|
|
144
149
|
foundType = new basic_1.DataReference(foundType);
|
package/build/src/registry.js
CHANGED