@abaplint/core 2.119.4 → 2.119.6

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.
@@ -5,6 +5,7 @@ const Expressions = require("../../2_statements/expressions");
5
5
  const basic_1 = require("../../types/basic");
6
6
  const inline_data_1 = require("../expressions/inline_data");
7
7
  const target_1 = require("../expressions/target");
8
+ const _reference_1 = require("../_reference");
8
9
  const _syntax_input_1 = require("../_syntax_input");
9
10
  class WhenType {
10
11
  runSyntax(node, input) {
@@ -14,19 +15,21 @@ class WhenType {
14
15
  return undefined;
15
16
  }
16
17
  let type = undefined;
17
- const className = nameToken.getStr();
18
- const found = input.scope.findObjectDefinition(className);
19
- if (found === undefined && input.scope.getDDIC().inErrorNamespace(className) === false) {
18
+ const className = nameToken.getStr().toUpperCase();
19
+ const found = input.scope.existsObject(className);
20
+ if (found === null || found === void 0 ? void 0 : found.id) {
21
+ type = new basic_1.ObjectReferenceType(found.id);
22
+ input.scope.addReference(nameToken, found.id, _reference_1.ReferenceType.ObjectOrientedReference, input.filename);
23
+ }
24
+ else if (input.scope.getDDIC().inErrorNamespace(className) === false) {
20
25
  type = basic_1.VoidType.get(className);
26
+ input.scope.addReference(nameToken, undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, input.filename, { ooName: className, ooType: "Void" });
21
27
  }
22
- else if (found === undefined) {
28
+ else {
23
29
  const message = "Class " + className + " not found";
24
30
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, nameToken, message));
25
31
  return;
26
32
  }
27
- else {
28
- type = new basic_1.ObjectReferenceType(found);
29
- }
30
33
  const target = node === null || node === void 0 ? void 0 : node.findDirectExpression(Expressions.Target);
31
34
  const inline = target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData);
32
35
  if (inline) {
@@ -511,6 +511,7 @@ class SyntaxLogic {
511
511
  isSelectionEventBoundary(statement) {
512
512
  return stuff_1.SELECTION_EVENTS.some(event => statement instanceof event)
513
513
  || statement instanceof Statements.Form
514
+ || statement instanceof Statements.Module
514
515
  || statement instanceof Statements.FunctionModule;
515
516
  }
516
517
  isSelectionEventBoundaryStructure(structure) {
@@ -74,7 +74,7 @@ class Registry {
74
74
  }
75
75
  static abaplintVersion() {
76
76
  // magic, see build script "version.sh"
77
- return "2.119.4";
77
+ return "2.119.6";
78
78
  }
79
79
  getDDICReferences() {
80
80
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.119.4",
3
+ "version": "2.119.6",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",