@abaplint/core 2.113.120 → 2.113.122
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/abaplint.d.ts +2 -0
- package/build/src/abap/3_structures/structures/loop.js +1 -1
- package/build/src/abap/3_structures/structures/normal.js +4 -1
- package/build/src/abap/5_syntax/_type_utils.js +23 -1
- package/build/src/abap/5_syntax/expressions/method_call_param.js +1 -4
- package/build/src/abap/5_syntax/expressions/method_parameters.js +1 -4
- package/build/src/abap/5_syntax/expressions/sql_for_all_entries.js +1 -1
- package/build/src/abap/5_syntax/statements/create_object.js +1 -4
- package/build/src/abap/5_syntax/statements/selection_screen.js +3 -2
- package/build/src/registry.js +1 -1
- package/build/src/rules/exit_or_check.js +1 -0
- package/build/src/rules/use_class_based_exceptions.js +3 -2
- package/package.json +3 -3
package/build/abaplint.d.ts
CHANGED
|
@@ -3241,6 +3241,8 @@ export declare const enum IdentifierMeta {
|
|
|
3241
3241
|
export declare interface IDependency {
|
|
3242
3242
|
/** Url of a git repository */
|
|
3243
3243
|
url?: string;
|
|
3244
|
+
/** Git branch */
|
|
3245
|
+
branch?: string;
|
|
3244
3246
|
/** Name of local folder with dependencies */
|
|
3245
3247
|
folder?: string;
|
|
3246
3248
|
/** File search, glob pattern */
|
|
@@ -6,7 +6,7 @@ const _combi_1 = require("./_combi");
|
|
|
6
6
|
const _1 = require(".");
|
|
7
7
|
class Loop {
|
|
8
8
|
getMatcher() {
|
|
9
|
-
return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.Loop), (0, _combi_1.
|
|
9
|
+
return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.Loop), (0, _combi_1.star)((0, _combi_1.sub)(_1.Body)), (0, _combi_1.sta)(Statements.EndLoop));
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
exports.Loop = Loop;
|
|
@@ -9,7 +9,10 @@ class Normal {
|
|
|
9
9
|
getMatcher() {
|
|
10
10
|
// note that the sequence of alternatives here influences performance
|
|
11
11
|
return (0, _combi_1.alt)((0, _combi_1.sta)(Statements.Move), (0, _combi_1.sta)(Statements.Call), (0, _combi_1.sta)(Statements.Data), (0, _combi_1.sub)(Structures.If), (0, _combi_1.sta)(Statements.Clear), (0, _combi_1.sta)(Statements.FieldSymbol), (0, _combi_1.sta)(Statements.CreateObject), (0, _combi_1.sta)(Statements.CallFunction), (0, _combi_1.sta)(_statement_1.MacroCall), (0, _combi_1.sub)(Structures.LoopAtScreen), (0, _combi_1.sub)(Structures.Loop), (0, _combi_1.sta)(Statements.Append), (0, _combi_1.sub)(Structures.Try), (0, _combi_1.sub)(Structures.OnChange), (0, _combi_1.sta)(Statements.ReadTable), (0, _combi_1.sta)(Statements.Assert), (0, _combi_1.sta)(Statements.Return), (0, _combi_1.sta)(Statements.Select), (0, _combi_1.sta)(Statements.Assign), (0, _combi_1.sta)(Statements.InsertInternal), (0, _combi_1.sta)(Statements.DeleteInternal), (0, _combi_1.sta)(Statements.Concatenate), (0, _combi_1.sub)(Structures.Case), (0, _combi_1.sub)(Structures.CaseType), (0, _combi_1.sub)(Structures.Enhancement), (0, _combi_1.sub)(Structures.EnhancementSection), (0, _combi_1.sta)(Statements.AddCorresponding), (0, _combi_1.sta)(Statements.Add), (0, _combi_1.sta)(Statements.AssignLocalCopy), (0, _combi_1.sta)(Statements.AuthorityCheck), (0, _combi_1.sta)(Statements.Back), (0, _combi_1.sta)(Statements.Break), (0, _combi_1.sta)(Statements.BreakId), (0, _combi_1.sta)(Statements.CallDatabase), (0, _combi_1.sta)(Statements.CallDialog), (0, _combi_1.sta)(Statements.CallKernel), (0, _combi_1.sta)(Statements.CallOLE), (0, _combi_1.sta)(Statements.CallScreen), (0, _combi_1.sta)(Statements.ModifyScreen), (0, _combi_1.sta)(Statements.CallSelectionScreen), (0, _combi_1.sta)(Statements.CallTransaction), (0, _combi_1.sta)(Statements.CallTransformation), (0, _combi_1.sta)(Statements.Check), (0, _combi_1.sta)(Statements.ClassDefinitionLoad), (0, _combi_1.sta)(Statements.CloseCursor), (0, _combi_1.sta)(Statements.CloseDataset), (0, _combi_1.sta)(Statements.Collect), (0, _combi_1.sta)(Statements.Commit), (0, _combi_1.sta)(Statements.Communication), (0, _combi_1.sta)(Statements.Compute), (0, _combi_1.sta)(Statements.CallBadi), (0, _combi_1.sta)(Statements.Condense), (0, _combi_1.sta)(Statements.Constant), (0, _combi_1.sta)(Statements.Contexts), (0, _combi_1.sta)(Statements.Continue), (0, _combi_1.sta)(Statements.ConvertText), (0, _combi_1.sta)(Statements.Convert), (0, _combi_1.sta)(Statements.CreateData), (0, _combi_1.sta)(Statements.CreateOLE), (0, _combi_1.sta)(Statements.DeleteCluster), (0, _combi_1.sta)(Statements.DeleteDatabase), (0, _combi_1.sta)(Statements.DeleteDataset), (0, _combi_1.sta)(Statements.DeleteDynpro), (0, _combi_1.sta)(Statements.DeleteMemory), (0, _combi_1.sta)(Statements.DeleteReport), (0, _combi_1.sta)(Statements.DeleteTextpool), (0, _combi_1.sta)(Statements.Demand), (0, _combi_1.sta)(Statements.Describe), (0, _combi_1.sta)(Statements.Detail), (0, _combi_1.sta)(Statements.Divide), (0, _combi_1.sta)(Statements.EditorCall), (0, _combi_1.sta)(Statements.EnhancementPoint), (0, _combi_1.sta)(Statements.Exit), (0, _combi_1.sta)(Statements.ExportDynpro), (0, _combi_1.sta)(Statements.Export), (0, _combi_1.sta)(Statements.Extract), (0, _combi_1.sta)(Statements.FetchNextCursor), (0, _combi_1.sta)(Statements.FieldGroup), (0, _combi_1.sta)(Statements.Fields), (0, _combi_1.sta)(Statements.Find), (0, _combi_1.sta)(Statements.Format), (0, _combi_1.sta)(Statements.FreeMemory), (0, _combi_1.sta)(Statements.FreeObject), (0, _combi_1.sta)(Statements.Free), (0, _combi_1.sta)(Statements.GenerateDynpro), (0, _combi_1.sta)(Statements.GenerateReport), (0, _combi_1.sta)(Statements.GenerateSubroutine), (0, _combi_1.sta)(Statements.GetBadi), (0, _combi_1.sta)(Statements.GetBit), (0, _combi_1.sta)(Statements.GetCursor), (0, _combi_1.sta)(Statements.GetDataset), (0, _combi_1.sta)(Statements.GetLocale), (0, _combi_1.sta)(Statements.GetParameter), (0, _combi_1.sta)(Statements.GetPFStatus), (0, _combi_1.sta)(Statements.GetProperty), (0, _combi_1.sta)(Statements.GetReference), (0, _combi_1.sta)(Statements.GetRunTime), (0, _combi_1.sta)(Statements.GetTime), (0, _combi_1.sta)(Statements.Hide), (0, _combi_1.sta)(Statements.Nodes), (0, _combi_1.sta)(Statements.ImportDynpro), (0, _combi_1.sta)(Statements.ImportNametab), (0, _combi_1.sta)(Statements.MoveCorresponding), (0, _combi_1.sta)(Statements.Import), (0, _combi_1.sta)(Statements.Infotypes), (0, _combi_1.sta)(Statements.Include), // include does not have to be at top level
|
|
12
|
-
(0, _combi_1.sta)(Statements.InsertDatabase), (0, _combi_1.sta)(Statements.InsertReport), (0, _combi_1.sta)(Statements.InsertTextpool), (0, _combi_1.sta)(Statements.InsertFieldGroup), (0, _combi_1.sta)(Statements.InterfaceLoad), (0, _combi_1.sta)(Statements.Leave), (0, _combi_1.sta)(Statements.LoadReport), (0, _combi_1.sta)(Statements.Local), (0, _combi_1.sta)(Statements.With), (0, _combi_1.sta)(Statements.LogPoint), (0, _combi_1.sta)(Statements.Message), (0, _combi_1.sta)(Statements.ModifyLine), (0, _combi_1.sta)(Statements.ModifyDatabase), (0, _combi_1.sta)(Statements.ModifyInternal), (0, _combi_1.sta)(Statements.Multiply), (0, _combi_1.sta)(Statements.NewLine), (0, _combi_1.sta)(Statements.NewPage), (0, _combi_1.sta)(Statements.OpenCursor), (0, _combi_1.sta)(Statements.OpenDataset), (0, _combi_1.sta)(Statements.Overlay), (0, _combi_1.sta)(Statements.Pack), (0, _combi_1.sta)(Statements.Perform), (0, _combi_1.sta)(Statements.FormDefinition), (0, _combi_1.sta)(Statements.Position), (0, _combi_1.sta)(Statements.Put), (0, _combi_1.sta)(Statements.PrintControl), (0, _combi_1.sta)(Statements.RaiseEvent), (0, _combi_1.sta)(Statements.RaiseEntityEvent), (0, _combi_1.sta)(Statements.Raise), (0, _combi_1.sta)(Statements.Ranges), (0, _combi_1.sta)(Statements.ReadDataset), (0, _combi_1.sta)(Statements.ReadLine), (0, _combi_1.sta)(Statements.ReadReport), (0, _combi_1.sta)(Statements.ReadTextpool), (0, _combi_1.sta)(Statements.Receive), (0, _combi_1.sta)(Statements.RefreshControl), (0, _combi_1.sta)(Statements.Refresh), (0, _combi_1.sta)(Statements.Reject), (0, _combi_1.sta)(Statements.Replace), (0, _combi_1.sta)(Statements.Reserve), (0, _combi_1.sta)(Statements.Resume), (0, _combi_1.sta)(Statements.Retry), (0, _combi_1.sta)(Statements.Rollback), (0, _combi_1.sta)(Statements.Scan), (0, _combi_1.sta)(Statements.ScrollList), (0, _combi_1.sta)(Statements.Search), (0, _combi_1.sta)(Statements.SetBit), (0, _combi_1.sta)(Statements.SetBlank), (0, _combi_1.sta)(Statements.SetCountry), (0, _combi_1.sta)(Statements.SetCursor), (0, _combi_1.sta)(Statements.SetDataset), (0, _combi_1.sta)(Statements.SetExtendedCheck), (0, _combi_1.sta)(Statements.SetHandler), (0, _combi_1.sta)(Statements.SetLanguage), (0, _combi_1.sta)(Statements.SetLeft), (0, _combi_1.sta)(Statements.SetLocale), (0, _combi_1.sta)(Statements.SetMargin), (0, _combi_1.sta)(Statements.SetParameter), (0, _combi_1.sta)(Statements.SetPFStatus), (0, _combi_1.sta)(Statements.SetProperty), (0, _combi_1.sta)(Statements.SetRunTime), (0, _combi_1.sta)(Statements.SetScreen), (0, _combi_1.sta)(Statements.SetTitlebar), (0, _combi_1.sta)(Statements.SetUserCommand), (0, _combi_1.sta)(Statements.SetUpdateTask), (0, _combi_1.sta)(Statements.Shift), (0, _combi_1.sta)(Statements.Skip), (0, _combi_1.sta)(Statements.SortDataset), (0, _combi_1.sta)(Statements.Sort), (0, _combi_1.sta)(Statements.Static), (0, _combi_1.sta)(Statements.Split), (0, _combi_1.sta)(Statements.Stop), (0, _combi_1.sta)(Statements.Submit), (0, _combi_1.sta)(Statements.Summary), (0, _combi_1.sta)(Statements.SubtractCorresponding), (0, _combi_1.sta)(Statements.Subtract), (0, _combi_1.sta)(Statements.SuppressDialog), (0, _combi_1.sta)(Statements.Supply), (0, _combi_1.sta)(Statements.Sum), (0, _combi_1.sta)(Statements.SyntaxCheck), (0, _combi_1.sta)(Statements.SystemCall), (0, _combi_1.sta)(Statements.Tables), (0, _combi_1.sta)(Statements.Transfer), (0, _combi_1.sta)(Statements.Translate), (0, _combi_1.sta)(Statements.Type), (0, _combi_1.sta)(Statements.TypePools), (0, _combi_1.sta)(Statements.Uline), (0, _combi_1.sta)(Statements.Unassign), (0, _combi_1.sta)(Statements.Unpack), (0, _combi_1.sta)(Statements.UpdateDatabase), (0, _combi_1.sta)(Statements.Wait), (0, _combi_1.sta)(Statements.Window), (0, _combi_1.sta)(Statements.Write), (0, _combi_1.sta)(Statements.CommitEntities), (0, _combi_1.sta)(Statements.GetPermissions), (0, _combi_1.sta)(Statements.SetLocks), (0, _combi_1.sta)(Statements.ModifyEntities), (0, _combi_1.sta)(Statements.ReadEntities), (0, _combi_1.sta)(Statements.RollbackEntities), (0, _combi_1.sta)(Statements.Module),
|
|
12
|
+
(0, _combi_1.sta)(Statements.InsertDatabase), (0, _combi_1.sta)(Statements.InsertReport), (0, _combi_1.sta)(Statements.InsertTextpool), (0, _combi_1.sta)(Statements.InsertFieldGroup), (0, _combi_1.sta)(Statements.InterfaceLoad), (0, _combi_1.sta)(Statements.Leave), (0, _combi_1.sta)(Statements.LoadReport), (0, _combi_1.sta)(Statements.Local), (0, _combi_1.sta)(Statements.With), (0, _combi_1.sta)(Statements.LogPoint), (0, _combi_1.sta)(Statements.Message), (0, _combi_1.sta)(Statements.ModifyLine), (0, _combi_1.sta)(Statements.ModifyDatabase), (0, _combi_1.sta)(Statements.ModifyInternal), (0, _combi_1.sta)(Statements.Multiply), (0, _combi_1.sta)(Statements.NewLine), (0, _combi_1.sta)(Statements.NewPage), (0, _combi_1.sta)(Statements.OpenCursor), (0, _combi_1.sta)(Statements.OpenDataset), (0, _combi_1.sta)(Statements.Overlay), (0, _combi_1.sta)(Statements.Pack), (0, _combi_1.sta)(Statements.Perform), (0, _combi_1.sta)(Statements.FormDefinition), (0, _combi_1.sta)(Statements.Position), (0, _combi_1.sta)(Statements.Put), (0, _combi_1.sta)(Statements.PrintControl), (0, _combi_1.sta)(Statements.RaiseEvent), (0, _combi_1.sta)(Statements.RaiseEntityEvent), (0, _combi_1.sta)(Statements.Raise), (0, _combi_1.sta)(Statements.Ranges), (0, _combi_1.sta)(Statements.ReadDataset), (0, _combi_1.sta)(Statements.ReadLine), (0, _combi_1.sta)(Statements.ReadReport), (0, _combi_1.sta)(Statements.ReadTextpool), (0, _combi_1.sta)(Statements.Receive), (0, _combi_1.sta)(Statements.RefreshControl), (0, _combi_1.sta)(Statements.Refresh), (0, _combi_1.sta)(Statements.Reject), (0, _combi_1.sta)(Statements.Replace), (0, _combi_1.sta)(Statements.Reserve), (0, _combi_1.sta)(Statements.Resume), (0, _combi_1.sta)(Statements.Retry), (0, _combi_1.sta)(Statements.Rollback), (0, _combi_1.sta)(Statements.Scan), (0, _combi_1.sta)(Statements.ScrollList), (0, _combi_1.sta)(Statements.Search), (0, _combi_1.sta)(Statements.SetBit), (0, _combi_1.sta)(Statements.SetBlank), (0, _combi_1.sta)(Statements.SetCountry), (0, _combi_1.sta)(Statements.SetCursor), (0, _combi_1.sta)(Statements.SetDataset), (0, _combi_1.sta)(Statements.SetExtendedCheck), (0, _combi_1.sta)(Statements.SetHandler), (0, _combi_1.sta)(Statements.SetLanguage), (0, _combi_1.sta)(Statements.SetLeft), (0, _combi_1.sta)(Statements.SetLocale), (0, _combi_1.sta)(Statements.SetMargin), (0, _combi_1.sta)(Statements.SetParameter), (0, _combi_1.sta)(Statements.SetPFStatus), (0, _combi_1.sta)(Statements.SetProperty), (0, _combi_1.sta)(Statements.SetRunTime), (0, _combi_1.sta)(Statements.SetScreen), (0, _combi_1.sta)(Statements.SetTitlebar), (0, _combi_1.sta)(Statements.SetUserCommand), (0, _combi_1.sta)(Statements.SetUpdateTask), (0, _combi_1.sta)(Statements.Shift), (0, _combi_1.sta)(Statements.Skip), (0, _combi_1.sta)(Statements.SortDataset), (0, _combi_1.sta)(Statements.Sort), (0, _combi_1.sta)(Statements.Static), (0, _combi_1.sta)(Statements.Split), (0, _combi_1.sta)(Statements.Stop), (0, _combi_1.sta)(Statements.Submit), (0, _combi_1.sta)(Statements.Summary), (0, _combi_1.sta)(Statements.SubtractCorresponding), (0, _combi_1.sta)(Statements.Subtract), (0, _combi_1.sta)(Statements.SuppressDialog), (0, _combi_1.sta)(Statements.Supply), (0, _combi_1.sta)(Statements.Sum), (0, _combi_1.sta)(Statements.SyntaxCheck), (0, _combi_1.sta)(Statements.SystemCall), (0, _combi_1.sta)(Statements.Tables), (0, _combi_1.sta)(Statements.Transfer), (0, _combi_1.sta)(Statements.Translate), (0, _combi_1.sta)(Statements.Type), (0, _combi_1.sta)(Statements.TypePools), (0, _combi_1.sta)(Statements.Uline), (0, _combi_1.sta)(Statements.Unassign), (0, _combi_1.sta)(Statements.Unpack), (0, _combi_1.sta)(Statements.UpdateDatabase), (0, _combi_1.sta)(Statements.Wait), (0, _combi_1.sta)(Statements.Window), (0, _combi_1.sta)(Statements.Write), (0, _combi_1.sta)(Statements.CommitEntities), (0, _combi_1.sta)(Statements.GetPermissions), (0, _combi_1.sta)(Statements.SetLocks), (0, _combi_1.sta)(Statements.ModifyEntities), (0, _combi_1.sta)(Statements.ReadEntities), (0, _combi_1.sta)(Statements.RollbackEntities), (0, _combi_1.sta)(Statements.Module), // todo, should be dynpro specific
|
|
13
|
+
(0, _combi_1.sta)(Statements.Field), // todo, should be dynpro specific
|
|
14
|
+
(0, _combi_1.sub)(Structures.Chain), // todo, should be dynpro specific
|
|
15
|
+
(0, _combi_1.sub)(Structures.Define), (0, _combi_1.sub)(Structures.TestInjection), (0, _combi_1.sub)(Structures.TestSeam), (0, _combi_1.sub)(Structures.TypeMesh), (0, _combi_1.sub)(Structures.Provide), (0, _combi_1.sub)(Structures.CatchSystemExceptions), (0, _combi_1.sub)(Structures.At), (0, _combi_1.sub)(Structures.AtFirst), (0, _combi_1.sub)(Structures.AtLast), (0, _combi_1.sub)(Structures.Constants), (0, _combi_1.sub)(Structures.Types), (0, _combi_1.sub)(Structures.Statics), (0, _combi_1.sub)(Structures.Select), (0, _combi_1.sub)(Structures.Data), (0, _combi_1.sub)(Structures.TypeEnum), (0, _combi_1.sub)(Structures.While), (0, _combi_1.sub)(Structures.With), (0, _combi_1.sub)(Structures.Do), (0, _combi_1.sub)(Structures.ExecSQL));
|
|
13
16
|
}
|
|
14
17
|
}
|
|
15
18
|
exports.Normal = Normal;
|
|
@@ -4,6 +4,7 @@ exports.TypeUtils = void 0;
|
|
|
4
4
|
const types_1 = require("../types");
|
|
5
5
|
const basic_1 = require("../types/basic");
|
|
6
6
|
const cgeneric_type_1 = require("../types/basic/cgeneric_type");
|
|
7
|
+
const Expressions = require("../2_statements/expressions");
|
|
7
8
|
// todo: refactor to static? for performance
|
|
8
9
|
class TypeUtils {
|
|
9
10
|
constructor(scope) {
|
|
@@ -222,8 +223,22 @@ class TypeUtils {
|
|
|
222
223
|
}
|
|
223
224
|
return false;
|
|
224
225
|
}
|
|
225
|
-
|
|
226
|
+
isCalculated(node) {
|
|
227
|
+
/*
|
|
228
|
+
if (node.getChildren().length === 1
|
|
229
|
+
&& node.get() instanceof Expressions.Source
|
|
230
|
+
&& node.getFirstChild()?.get() instanceof Expressions.MethodCallChain) {
|
|
231
|
+
return false;
|
|
232
|
+
}
|
|
233
|
+
*/
|
|
234
|
+
const calculated = node.findFirstExpression(Expressions.MethodCallChain) !== undefined
|
|
235
|
+
|| node.findFirstExpression(Expressions.StringTemplate) !== undefined
|
|
236
|
+
|| node.findFirstExpression(Expressions.ArithOperator) !== undefined;
|
|
237
|
+
return calculated;
|
|
238
|
+
}
|
|
239
|
+
isAssignableStrict(source, target, node) {
|
|
226
240
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
241
|
+
const calculated = node ? this.isCalculated(node) : false;
|
|
227
242
|
/*
|
|
228
243
|
console.dir(source);
|
|
229
244
|
console.dir(target);
|
|
@@ -275,6 +290,13 @@ class TypeUtils {
|
|
|
275
290
|
else if (source instanceof basic_1.StringType) {
|
|
276
291
|
if (target instanceof basic_1.StructureType && this.structureContainsString(target)) {
|
|
277
292
|
return false;
|
|
293
|
+
/*
|
|
294
|
+
} else if (target instanceof CharacterType) {
|
|
295
|
+
if (source.getAbstractTypeData()?.derivedFromConstant === true) {
|
|
296
|
+
return true;
|
|
297
|
+
}
|
|
298
|
+
return false;
|
|
299
|
+
*/
|
|
278
300
|
}
|
|
279
301
|
else if (target instanceof basic_1.IntegerType) {
|
|
280
302
|
if (((_f = source.getAbstractTypeData()) === null || _f === void 0 ? void 0 : _f.derivedFromConstant) === true) {
|
|
@@ -70,15 +70,12 @@ class MethodCallParam {
|
|
|
70
70
|
if (child.get() instanceof Expressions.Source) {
|
|
71
71
|
sourceType = new source_1.Source().runSyntax(child, input, targetType);
|
|
72
72
|
}
|
|
73
|
-
const calculated = child.findFirstExpression(Expressions.MethodCallChain) !== undefined
|
|
74
|
-
|| child.findFirstExpression(Expressions.StringTemplate) !== undefined
|
|
75
|
-
|| child.findFirstExpression(Expressions.ArithOperator) !== undefined;
|
|
76
73
|
if (sourceType === undefined) {
|
|
77
74
|
const message = "No source type determined, method source";
|
|
78
75
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
79
76
|
return;
|
|
80
77
|
}
|
|
81
|
-
else if (new _type_utils_1.TypeUtils(input.scope).isAssignableStrict(sourceType, targetType,
|
|
78
|
+
else if (new _type_utils_1.TypeUtils(input.scope).isAssignableStrict(sourceType, targetType, child) === false) {
|
|
82
79
|
const message = "Method parameter type not compatible";
|
|
83
80
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
84
81
|
return;
|
|
@@ -158,15 +158,12 @@ class MethodParameters {
|
|
|
158
158
|
}
|
|
159
159
|
for (const item of items) {
|
|
160
160
|
const parameter = allImporting.find(p => p.getName().toUpperCase() === item.name);
|
|
161
|
-
const calculated = item.source.findFirstExpression(Expressions.MethodCallChain) !== undefined
|
|
162
|
-
|| item.source.findFirstExpression(Expressions.StringTemplate) !== undefined
|
|
163
|
-
|| item.source.findFirstExpression(Expressions.ArithOperator) !== undefined;
|
|
164
161
|
if (parameter === undefined) {
|
|
165
162
|
const message = "Method importing parameter \"" + item.name + "\" does not exist";
|
|
166
163
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
167
164
|
continue;
|
|
168
165
|
}
|
|
169
|
-
else if (new _type_utils_1.TypeUtils(input.scope).isAssignableStrict(item.sourceType, parameter.getType(),
|
|
166
|
+
else if (new _type_utils_1.TypeUtils(input.scope).isAssignableStrict(item.sourceType, parameter.getType(), item.source) === false) {
|
|
170
167
|
const message = "Method parameter type not compatible, " + item.name;
|
|
171
168
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
172
169
|
return;
|
|
@@ -17,7 +17,7 @@ class SQLForAllEntries {
|
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
19
|
if (!(type instanceof basic_1.TableType)) {
|
|
20
|
-
const message = "FAE parameter must be table type";
|
|
20
|
+
const message = "FAE parameter must be table type, " + (type === null || type === void 0 ? void 0 : type.constructor.name);
|
|
21
21
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
@@ -120,16 +120,13 @@ class CreateObject {
|
|
|
120
120
|
}
|
|
121
121
|
const source = p.findDirectExpression(Expressions.Source);
|
|
122
122
|
const sourceType = new source_1.Source().runSyntax(source, input);
|
|
123
|
-
const calculated = (source === null || source === void 0 ? void 0 : source.findFirstExpression(Expressions.MethodCallChain)) !== undefined
|
|
124
|
-
|| (source === null || source === void 0 ? void 0 : source.findFirstExpression(Expressions.StringTemplate)) !== undefined
|
|
125
|
-
|| (source === null || source === void 0 ? void 0 : source.findFirstExpression(Expressions.ArithOperator)) !== undefined;
|
|
126
123
|
const found = allImporting === null || allImporting === void 0 ? void 0 : allImporting.find(p => p.getName().toUpperCase() === name);
|
|
127
124
|
if (found === undefined) {
|
|
128
125
|
const message = `constructor parameter "${name}" does not exist`;
|
|
129
126
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
130
127
|
return;
|
|
131
128
|
}
|
|
132
|
-
else if (new _type_utils_1.TypeUtils(input.scope).isAssignableStrict(sourceType, found.getType(),
|
|
129
|
+
else if (new _type_utils_1.TypeUtils(input.scope).isAssignableStrict(sourceType, found.getType(), source) === false) {
|
|
133
130
|
const message = `constructor parameter "${name}" type not compatible`;
|
|
134
131
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
135
132
|
return;
|
|
@@ -10,7 +10,9 @@ class SelectionScreen {
|
|
|
10
10
|
const blockNode = node.findFirstExpression(Expressions.BlockName);
|
|
11
11
|
const blockToken = blockNode === null || blockNode === void 0 ? void 0 : blockNode.getFirstToken();
|
|
12
12
|
const blockName = blockNode === null || blockNode === void 0 ? void 0 : blockNode.concatTokens();
|
|
13
|
-
|
|
13
|
+
const concat = node.concatTokens().toUpperCase();
|
|
14
|
+
const maxNameLengthAllowed = concat.includes("BEGIN OF TABBED BLOCK") ? 16 : 20;
|
|
15
|
+
if (blockName !== undefined && blockName.length > maxNameLengthAllowed) {
|
|
14
16
|
const message = "SELECTION-SCREEN block name too long, " + blockName;
|
|
15
17
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
16
18
|
return;
|
|
@@ -22,7 +24,6 @@ class SelectionScreen {
|
|
|
22
24
|
return;
|
|
23
25
|
}
|
|
24
26
|
const fieldName = field === null || field === void 0 ? void 0 : field.getFirstToken();
|
|
25
|
-
const concat = node.concatTokens().toUpperCase();
|
|
26
27
|
if (concat.includes("BEGIN OF TABBED BLOCK") && blockToken) {
|
|
27
28
|
const type = new basic_1.StructureType([
|
|
28
29
|
{ name: "PROG", type: new basic_1.CharacterType(40) },
|
package/build/src/registry.js
CHANGED
|
@@ -59,6 +59,7 @@ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-re
|
|
|
59
59
|
else if (this.conf.allowCheck === false && get instanceof Statements.Check && stack.length === 0) {
|
|
60
60
|
const message = "CHECK is not allowed outside of loops";
|
|
61
61
|
let tokensString = statement.concatTokens();
|
|
62
|
+
tokensString = tokensString.replace(/^check /i, "CHECK ");
|
|
62
63
|
tokensString = tokensString.split("CHECK")[1].trim();
|
|
63
64
|
const replacement = "IF NOT " + tokensString + "\n RETURN.\nENDIF.";
|
|
64
65
|
const fix = edit_helper_1.EditHelper.replaceRange(file, statement.getFirstToken().getStart(), statement.getLastToken().getEnd(), replacement);
|
|
@@ -47,8 +47,9 @@ ENDINTERFACE.`,
|
|
|
47
47
|
var _a;
|
|
48
48
|
const issues = [];
|
|
49
49
|
for (const s of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllStatements(Statements.MethodDef)) || []) {
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
const expr = s.findDirectExpression(Expressions.MethodDefExceptions);
|
|
51
|
+
if (expr) {
|
|
52
|
+
issues.push(issue_1.Issue.atToken(file, expr.getFirstToken(), this.getMessage(), this.getMetadata().key));
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
55
|
return issues;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.113.
|
|
3
|
+
"version": "2.113.122",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -53,10 +53,10 @@
|
|
|
53
53
|
"@microsoft/api-extractor": "^7.52.8",
|
|
54
54
|
"@types/chai": "^4.3.20",
|
|
55
55
|
"@types/mocha": "^10.0.10",
|
|
56
|
-
"@types/node": "^22.15.
|
|
56
|
+
"@types/node": "^22.15.21",
|
|
57
57
|
"chai": "^4.5.0",
|
|
58
58
|
"eslint": "^9.27.0",
|
|
59
|
-
"mocha": "^11.
|
|
59
|
+
"mocha": "^11.5.0",
|
|
60
60
|
"c8": "^10.1.3",
|
|
61
61
|
"source-map-support": "^0.5.21",
|
|
62
62
|
"ts-json-schema-generator": "^2.4.0",
|