@abaplint/core 2.105.20 → 2.105.21
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.
- package/build/src/abap/5_syntax/_type_utils.js +1 -0
- package/build/src/abap/5_syntax/expressions/new_object.js +1 -1
- package/build/src/abap/5_syntax/statements/create_object.js +1 -0
- package/build/src/registry.js +1 -1
- package/build/src/rules/keep_single_parameter_on_one_line.js +5 -0
- package/package.json +2 -2
|
@@ -26,6 +26,7 @@ class TypeUtils {
|
|
|
26
26
|
}
|
|
27
27
|
else if (type instanceof basic_1.StringType
|
|
28
28
|
|| type instanceof basic_1.AnyType
|
|
29
|
+
|| type instanceof basic_1.DataType
|
|
29
30
|
|| type instanceof basic_1.CharacterType
|
|
30
31
|
|| type instanceof basic_1.SimpleType
|
|
31
32
|
|| type instanceof cgeneric_type_1.CGenericType
|
|
@@ -109,7 +109,7 @@ class NewObject {
|
|
|
109
109
|
new method_parameters_1.MethodParameters().checkExporting(parameters, scope, method, filename);
|
|
110
110
|
}
|
|
111
111
|
else if (requiredParameters.length > 0) {
|
|
112
|
-
throw new Error(`constructor parameter "${requiredParameters[0].getName()}" must be supplied` + name);
|
|
112
|
+
throw new Error(`constructor parameter "${requiredParameters[0].getName()}" must be supplied, ` + name);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
defaultImportingType(method) {
|
|
@@ -49,6 +49,7 @@ class CreateObject {
|
|
|
49
49
|
}
|
|
50
50
|
else if (!(found instanceof basic_1.ObjectReferenceType)
|
|
51
51
|
&& !(found instanceof basic_1.AnyType)
|
|
52
|
+
&& !(found instanceof basic_1.DataType)
|
|
52
53
|
&& !(found instanceof basic_1.GenericObjectReferenceType)) {
|
|
53
54
|
throw new Error("Target must be an object reference, " + t.concatTokens());
|
|
54
55
|
}
|
package/build/src/registry.js
CHANGED
|
@@ -126,6 +126,11 @@ class KeepSingleParameterCallsOnOneLine extends _abap_rule_1.ABAPRule {
|
|
|
126
126
|
}
|
|
127
127
|
isSingleParameter(c) {
|
|
128
128
|
if (c.findDirectExpression(Expressions.Source)) {
|
|
129
|
+
for (const params of c.findAllExpressions(Expressions.ParameterListS)) {
|
|
130
|
+
if (params.getChildren().length > 1) {
|
|
131
|
+
return false;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
129
134
|
return true;
|
|
130
135
|
}
|
|
131
136
|
const list = c.findDirectExpression(Expressions.ParameterListS);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.105.
|
|
3
|
+
"version": "2.105.21",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
"homepage": "https://abaplint.org",
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@microsoft/api-extractor": "^7.40.
|
|
53
|
+
"@microsoft/api-extractor": "^7.40.6",
|
|
54
54
|
"@types/chai": "^4.3.11",
|
|
55
55
|
"@types/mocha": "^10.0.6",
|
|
56
56
|
"@types/node": "^20.11.19",
|