@abaplint/core 2.102.47 → 2.102.48

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.
@@ -320,6 +320,11 @@ class TypeUtils {
320
320
  return false;
321
321
  }
322
322
  }
323
+ else if (source instanceof basic_1.GenericObjectReferenceType) {
324
+ if (target instanceof basic_1.ObjectReferenceType) {
325
+ return false;
326
+ }
327
+ }
323
328
  else if (source instanceof basic_1.ObjectReferenceType) {
324
329
  if (target instanceof basic_1.XSequenceType
325
330
  || target instanceof basic_1.IntegerType
@@ -65,7 +65,7 @@ class Registry {
65
65
  }
66
66
  static abaplintVersion() {
67
67
  // magic, see build script "version.sh"
68
- return "2.102.47";
68
+ return "2.102.48";
69
69
  }
70
70
  getDDICReferences() {
71
71
  return this.ddicReferences;
@@ -118,6 +118,7 @@ FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
118
118
  }
119
119
  else if (config.assign === true
120
120
  && statement.get() instanceof Statements.Assign
121
+ && this.isSimpleAssign(statement) === false
121
122
  && this.isChecked(i, statements) === false) {
122
123
  issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));
123
124
  }
@@ -131,6 +132,16 @@ FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
131
132
  return issues;
132
133
  }
133
134
  ////////////////
135
+ isSimpleAssign(statement) {
136
+ if (statement.getChildren().length === 5) {
137
+ const source = statement.findDirectExpression(Expressions.AssignSource);
138
+ if ((source === null || source === void 0 ? void 0 : source.getChildren().length) === 1
139
+ && source.findDirectExpression(Expressions.Source) !== undefined) {
140
+ return true;
141
+ }
142
+ }
143
+ return false;
144
+ }
134
145
  isExemptedFind(s) {
135
146
  // see https://github.com/abaplint/abaplint/issues/2130
136
147
  return s.concatTokens().toUpperCase().includes(" MATCH COUNT ") === true;
@@ -72,7 +72,7 @@ class UncaughtException extends _abap_rule_1.ABAPRule {
72
72
  return this.issues;
73
73
  }
74
74
  traverse(n, file) {
75
- var _a;
75
+ var _a, _b, _c, _d;
76
76
  const get = n.get();
77
77
  if (get instanceof Structures.ClassDefinition
78
78
  || get instanceof Structures.Interface) {
@@ -83,10 +83,16 @@ class UncaughtException extends _abap_rule_1.ABAPRule {
83
83
  // note that TRY-CATCH might be arbitrarily nested
84
84
  const previous = this.sinked ? this.sinked.slice() : undefined;
85
85
  this.addFromTryStructure(n);
86
- for (const c of n.getChildren()) {
86
+ for (const c of ((_a = n.findDirectStructure(Structures.Body)) === null || _a === void 0 ? void 0 : _a.getChildren()) || []) {
87
87
  this.traverse(c, file);
88
88
  }
89
89
  this.sinked = previous;
90
+ for (const c of ((_b = n.findDirectStructure(Structures.Catch)) === null || _b === void 0 ? void 0 : _b.getChildren()) || []) {
91
+ this.traverse(c, file);
92
+ }
93
+ for (const c of ((_c = n.findDirectStructure(Structures.Cleanup)) === null || _c === void 0 ? void 0 : _c.getChildren()) || []) {
94
+ this.traverse(c, file);
95
+ }
90
96
  return;
91
97
  }
92
98
  else {
@@ -116,7 +122,7 @@ class UncaughtException extends _abap_rule_1.ABAPRule {
116
122
  let name = undefined;
117
123
  const concat = n.concatTokens().toUpperCase();
118
124
  if (concat.startsWith("RAISE EXCEPTION TYPE ")) {
119
- name = (_a = n.findFirstExpression(Expressions.ClassName)) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStr().toUpperCase();
125
+ name = (_d = n.findFirstExpression(Expressions.ClassName)) === null || _d === void 0 ? void 0 : _d.getFirstToken().getStr().toUpperCase();
120
126
  }
121
127
  this.check(name, n, file);
122
128
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.102.47",
3
+ "version": "2.102.48",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",