@abaplint/core 2.89.0 → 2.89.1
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.
|
@@ -198,10 +198,18 @@ class Source {
|
|
|
198
198
|
}
|
|
199
199
|
return targetType;
|
|
200
200
|
}
|
|
201
|
-
if (typeName !== "#") {
|
|
201
|
+
if (typeName !== "#" && typeToken) {
|
|
202
202
|
const found = basic.parseType(typeExpression);
|
|
203
|
-
if (found
|
|
204
|
-
|
|
203
|
+
if (found && found instanceof unknown_type_1.UnknownType) {
|
|
204
|
+
if (scope.getDDIC().inErrorNamespace(typeName) === false) {
|
|
205
|
+
scope.addReference(typeToken, undefined, _reference_1.ReferenceType.VoidType, filename);
|
|
206
|
+
return new basic_1.VoidType(typeName);
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
const tid = new _typed_identifier_1.TypedIdentifier(typeToken, filename, found);
|
|
210
|
+
scope.addReference(typeToken, tid, _reference_1.ReferenceType.TypeReference, filename);
|
|
211
|
+
return found;
|
|
212
|
+
}
|
|
205
213
|
}
|
|
206
214
|
else if (found === undefined) {
|
|
207
215
|
throw new Error("Type \"" + typeName + "\" not found in scope, VALUE");
|
package/build/src/registry.js
CHANGED
|
@@ -7,6 +7,7 @@ const _basic_rule_config_1 = require("./_basic_rule_config");
|
|
|
7
7
|
const Structures = require("../abap/3_structures/structures");
|
|
8
8
|
const Expressions = require("../abap/2_statements/expressions");
|
|
9
9
|
const _irule_1 = require("./_irule");
|
|
10
|
+
const version_1 = require("../version");
|
|
10
11
|
class NoInlineInOptionalBranchesConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
11
12
|
}
|
|
12
13
|
exports.NoInlineInOptionalBranchesConf = NoInlineInOptionalBranchesConf;
|
|
@@ -43,6 +44,12 @@ Not considered optional branches:
|
|
|
43
44
|
}
|
|
44
45
|
runParsed(file) {
|
|
45
46
|
const output = [];
|
|
47
|
+
const version = this.reg.getConfig().getVersion();
|
|
48
|
+
if (version === version_1.Version.v700
|
|
49
|
+
|| version === version_1.Version.v702
|
|
50
|
+
|| version === version_1.Version.OpenABAP) {
|
|
51
|
+
return [];
|
|
52
|
+
}
|
|
46
53
|
const struc = file.getStructure();
|
|
47
54
|
if (struc === undefined) {
|
|
48
55
|
return []; // syntax error
|
|
@@ -10,6 +10,7 @@ const _irule_1 = require("./_irule");
|
|
|
10
10
|
const _typed_identifier_1 = require("../abap/types/_typed_identifier");
|
|
11
11
|
const _scope_type_1 = require("../abap/5_syntax/_scope_type");
|
|
12
12
|
const _reference_1 = require("../abap/5_syntax/_reference");
|
|
13
|
+
const basic_1 = require("../abap/types/basic");
|
|
13
14
|
class UnknownTypesConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
14
15
|
}
|
|
15
16
|
exports.UnknownTypesConf = UnknownTypesConf;
|
|
@@ -70,6 +71,12 @@ class UnknownTypes {
|
|
|
70
71
|
const message = r.extra.ooName + " unknown";
|
|
71
72
|
ret.push(issue_1.Issue.atIdentifier(r.position, message, this.getMetadata().key, this.conf.severity));
|
|
72
73
|
}
|
|
74
|
+
if (r.referenceType === _reference_1.ReferenceType.TypeReference
|
|
75
|
+
&& r.resolved instanceof _typed_identifier_1.TypedIdentifier
|
|
76
|
+
&& r.resolved.getType() instanceof basic_1.UnknownType) {
|
|
77
|
+
const message = r.resolved.getType().getError();
|
|
78
|
+
ret.push(issue_1.Issue.atIdentifier(r.position, message, this.getMetadata().key, this.conf.severity));
|
|
79
|
+
}
|
|
73
80
|
}
|
|
74
81
|
if (node.getIdentifier().stype !== _scope_type_1.ScopeType.ClassImplementation) {
|
|
75
82
|
const vars = nodeData.vars;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.89.
|
|
3
|
+
"version": "2.89.1",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@microsoft/api-extractor": "^7.22.2",
|
|
49
49
|
"@types/chai": "^4.3.1",
|
|
50
50
|
"@types/mocha": "^9.1.0",
|
|
51
|
-
"@types/node": "^17.0.
|
|
51
|
+
"@types/node": "^17.0.25",
|
|
52
52
|
"chai": "^4.3.6",
|
|
53
53
|
"eslint": "^8.13.0",
|
|
54
54
|
"mocha": "^9.2.2",
|