@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
- foundType = new basic_1.DataReference(s);
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);
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.233";
70
+ return "2.113.234";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.233",
3
+ "version": "2.113.234",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",