@abaplint/cli 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.
Files changed (2) hide show
  1. package/build/cli.js +45 -22
  2. package/package.json +3 -3
package/build/cli.js CHANGED
@@ -973,7 +973,11 @@ async function loadDependencies(config, compress, bar, base) {
973
973
  if (d.url) {
974
974
  process.stderr.write("Clone: " + d.url + "\n");
975
975
  const dir = fs.mkdtempSync(path.join(os.tmpdir(), "abaplint-"));
976
- childProcess.execSync("git clone --quiet --depth 1 " + d.url + " .", { cwd: dir, stdio: "inherit" });
976
+ let branch = "";
977
+ if (d.branch) {
978
+ branch = "-b " + d.branch + " ";
979
+ }
980
+ childProcess.execSync("git clone --quiet --depth 1 " + branch + d.url + " .", { cwd: dir, stdio: "inherit" });
977
981
  const names = file_operations_1.FileOperations.loadFileNames(dir + d.files);
978
982
  files = files.concat(await file_operations_1.FileOperations.loadFiles(compress, names, bar));
979
983
  file_operations_1.FileOperations.deleteFolderRecursive(dir);
@@ -19708,7 +19712,7 @@ const _combi_1 = __webpack_require__(/*! ./_combi */ "./node_modules/@abaplint/c
19708
19712
  const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js");
19709
19713
  class Loop {
19710
19714
  getMatcher() {
19711
- return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.Loop), (0, _combi_1.alt)((0, _combi_1.sub)(_1.Chain), (0, _combi_1.star)((0, _combi_1.sub)(_1.Body))), (0, _combi_1.sta)(Statements.EndLoop));
19715
+ 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));
19712
19716
  }
19713
19717
  }
19714
19718
  exports.Loop = Loop;
@@ -19804,7 +19808,10 @@ class Normal {
19804
19808
  getMatcher() {
19805
19809
  // note that the sequence of alternatives here influences performance
19806
19810
  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
19807
- (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), (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));
19811
+ (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
19812
+ (0, _combi_1.sta)(Statements.Field), // todo, should be dynpro specific
19813
+ (0, _combi_1.sub)(Structures.Chain), // todo, should be dynpro specific
19814
+ (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));
19808
19815
  }
19809
19816
  }
19810
19817
  exports.Normal = Normal;
@@ -23181,6 +23188,7 @@ exports.TypeUtils = void 0;
23181
23188
  const types_1 = __webpack_require__(/*! ../types */ "./node_modules/@abaplint/core/build/src/abap/types/index.js");
23182
23189
  const basic_1 = __webpack_require__(/*! ../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
23183
23190
  const cgeneric_type_1 = __webpack_require__(/*! ../types/basic/cgeneric_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/cgeneric_type.js");
23191
+ const Expressions = __webpack_require__(/*! ../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
23184
23192
  // todo: refactor to static? for performance
23185
23193
  class TypeUtils {
23186
23194
  constructor(scope) {
@@ -23399,8 +23407,22 @@ class TypeUtils {
23399
23407
  }
23400
23408
  return false;
23401
23409
  }
23402
- isAssignableStrict(source, target, calculated = false) {
23410
+ isCalculated(node) {
23411
+ /*
23412
+ if (node.getChildren().length === 1
23413
+ && node.get() instanceof Expressions.Source
23414
+ && node.getFirstChild()?.get() instanceof Expressions.MethodCallChain) {
23415
+ return false;
23416
+ }
23417
+ */
23418
+ const calculated = node.findFirstExpression(Expressions.MethodCallChain) !== undefined
23419
+ || node.findFirstExpression(Expressions.StringTemplate) !== undefined
23420
+ || node.findFirstExpression(Expressions.ArithOperator) !== undefined;
23421
+ return calculated;
23422
+ }
23423
+ isAssignableStrict(source, target, node) {
23403
23424
  var _a, _b, _c, _d, _e, _f, _g, _h;
23425
+ const calculated = node ? this.isCalculated(node) : false;
23404
23426
  /*
23405
23427
  console.dir(source);
23406
23428
  console.dir(target);
@@ -23452,6 +23474,13 @@ class TypeUtils {
23452
23474
  else if (source instanceof basic_1.StringType) {
23453
23475
  if (target instanceof basic_1.StructureType && this.structureContainsString(target)) {
23454
23476
  return false;
23477
+ /*
23478
+ } else if (target instanceof CharacterType) {
23479
+ if (source.getAbstractTypeData()?.derivedFromConstant === true) {
23480
+ return true;
23481
+ }
23482
+ return false;
23483
+ */
23455
23484
  }
23456
23485
  else if (target instanceof basic_1.IntegerType) {
23457
23486
  if (((_f = source.getAbstractTypeData()) === null || _f === void 0 ? void 0 : _f.derivedFromConstant) === true) {
@@ -26680,15 +26709,12 @@ class MethodCallParam {
26680
26709
  if (child.get() instanceof Expressions.Source) {
26681
26710
  sourceType = new source_1.Source().runSyntax(child, input, targetType);
26682
26711
  }
26683
- const calculated = child.findFirstExpression(Expressions.MethodCallChain) !== undefined
26684
- || child.findFirstExpression(Expressions.StringTemplate) !== undefined
26685
- || child.findFirstExpression(Expressions.ArithOperator) !== undefined;
26686
26712
  if (sourceType === undefined) {
26687
26713
  const message = "No source type determined, method source";
26688
26714
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
26689
26715
  return;
26690
26716
  }
26691
- else if (new _type_utils_1.TypeUtils(input.scope).isAssignableStrict(sourceType, targetType, calculated) === false) {
26717
+ else if (new _type_utils_1.TypeUtils(input.scope).isAssignableStrict(sourceType, targetType, child) === false) {
26692
26718
  const message = "Method parameter type not compatible";
26693
26719
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
26694
26720
  return;
@@ -26979,15 +27005,12 @@ class MethodParameters {
26979
27005
  }
26980
27006
  for (const item of items) {
26981
27007
  const parameter = allImporting.find(p => p.getName().toUpperCase() === item.name);
26982
- const calculated = item.source.findFirstExpression(Expressions.MethodCallChain) !== undefined
26983
- || item.source.findFirstExpression(Expressions.StringTemplate) !== undefined
26984
- || item.source.findFirstExpression(Expressions.ArithOperator) !== undefined;
26985
27008
  if (parameter === undefined) {
26986
27009
  const message = "Method importing parameter \"" + item.name + "\" does not exist";
26987
27010
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
26988
27011
  continue;
26989
27012
  }
26990
- else if (new _type_utils_1.TypeUtils(input.scope).isAssignableStrict(item.sourceType, parameter.getType(), calculated) === false) {
27013
+ else if (new _type_utils_1.TypeUtils(input.scope).isAssignableStrict(item.sourceType, parameter.getType(), item.source) === false) {
26991
27014
  const message = "Method parameter type not compatible, " + item.name;
26992
27015
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
26993
27016
  return;
@@ -28390,7 +28413,7 @@ class SQLForAllEntries {
28390
28413
  return;
28391
28414
  }
28392
28415
  if (!(type instanceof basic_1.TableType)) {
28393
- const message = "FAE parameter must be table type";
28416
+ const message = "FAE parameter must be table type, " + (type === null || type === void 0 ? void 0 : type.constructor.name);
28394
28417
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
28395
28418
  return;
28396
28419
  }
@@ -30899,16 +30922,13 @@ class CreateObject {
30899
30922
  }
30900
30923
  const source = p.findDirectExpression(Expressions.Source);
30901
30924
  const sourceType = new source_1.Source().runSyntax(source, input);
30902
- const calculated = (source === null || source === void 0 ? void 0 : source.findFirstExpression(Expressions.MethodCallChain)) !== undefined
30903
- || (source === null || source === void 0 ? void 0 : source.findFirstExpression(Expressions.StringTemplate)) !== undefined
30904
- || (source === null || source === void 0 ? void 0 : source.findFirstExpression(Expressions.ArithOperator)) !== undefined;
30905
30925
  const found = allImporting === null || allImporting === void 0 ? void 0 : allImporting.find(p => p.getName().toUpperCase() === name);
30906
30926
  if (found === undefined) {
30907
30927
  const message = `constructor parameter "${name}" does not exist`;
30908
30928
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
30909
30929
  return;
30910
30930
  }
30911
- else if (new _type_utils_1.TypeUtils(input.scope).isAssignableStrict(sourceType, found.getType(), calculated) === false) {
30931
+ else if (new _type_utils_1.TypeUtils(input.scope).isAssignableStrict(sourceType, found.getType(), source) === false) {
30912
30932
  const message = `constructor parameter "${name}" type not compatible`;
30913
30933
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
30914
30934
  return;
@@ -33576,7 +33596,9 @@ class SelectionScreen {
33576
33596
  const blockNode = node.findFirstExpression(Expressions.BlockName);
33577
33597
  const blockToken = blockNode === null || blockNode === void 0 ? void 0 : blockNode.getFirstToken();
33578
33598
  const blockName = blockNode === null || blockNode === void 0 ? void 0 : blockNode.concatTokens();
33579
- if (blockName !== undefined && blockName.length > 16) {
33599
+ const concat = node.concatTokens().toUpperCase();
33600
+ const maxNameLengthAllowed = concat.includes("BEGIN OF TABBED BLOCK") ? 16 : 20;
33601
+ if (blockName !== undefined && blockName.length > maxNameLengthAllowed) {
33580
33602
  const message = "SELECTION-SCREEN block name too long, " + blockName;
33581
33603
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
33582
33604
  return;
@@ -33588,7 +33610,6 @@ class SelectionScreen {
33588
33610
  return;
33589
33611
  }
33590
33612
  const fieldName = field === null || field === void 0 ? void 0 : field.getFirstToken();
33591
- const concat = node.concatTokens().toUpperCase();
33592
33613
  if (concat.includes("BEGIN OF TABBED BLOCK") && blockToken) {
33593
33614
  const type = new basic_1.StructureType([
33594
33615
  { name: "PROG", type: new basic_1.CharacterType(40) },
@@ -54209,7 +54230,7 @@ class Registry {
54209
54230
  }
54210
54231
  static abaplintVersion() {
54211
54232
  // magic, see build script "version.sh"
54212
- return "2.113.120";
54233
+ return "2.113.122";
54213
54234
  }
54214
54235
  getDDICReferences() {
54215
54236
  return this.ddicReferences;
@@ -62951,6 +62972,7 @@ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-re
62951
62972
  else if (this.conf.allowCheck === false && get instanceof Statements.Check && stack.length === 0) {
62952
62973
  const message = "CHECK is not allowed outside of loops";
62953
62974
  let tokensString = statement.concatTokens();
62975
+ tokensString = tokensString.replace(/^check /i, "CHECK ");
62954
62976
  tokensString = tokensString.split("CHECK")[1].trim();
62955
62977
  const replacement = "IF NOT " + tokensString + "\n RETURN.\nENDIF.";
62956
62978
  const fix = edit_helper_1.EditHelper.replaceRange(file, statement.getFirstToken().getStart(), statement.getLastToken().getEnd(), replacement);
@@ -76479,8 +76501,9 @@ ENDINTERFACE.`,
76479
76501
  var _a;
76480
76502
  const issues = [];
76481
76503
  for (const s of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllStatements(Statements.MethodDef)) || []) {
76482
- if (s.findDirectExpression(Expressions.MethodDefExceptions)) {
76483
- issues.push(issue_1.Issue.atStatement(file, s, this.getMessage(), this.getMetadata().key));
76504
+ const expr = s.findDirectExpression(Expressions.MethodDefExceptions);
76505
+ if (expr) {
76506
+ issues.push(issue_1.Issue.atToken(file, expr.getFirstToken(), this.getMessage(), this.getMetadata().key));
76484
76507
  }
76485
76508
  }
76486
76509
  return issues;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.120",
3
+ "version": "2.113.122",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.113.120",
41
+ "@abaplint/core": "^2.113.122",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/glob": "^8.1.0",
44
44
  "@types/minimist": "^1.2.5",
@@ -53,7 +53,7 @@
53
53
  "json5": "^2.2.3",
54
54
  "memfs": "^4.17.2",
55
55
  "minimist": "^1.2.8",
56
- "mocha": "^11.4.0",
56
+ "mocha": "^11.5.0",
57
57
  "progress": "^2.0.3",
58
58
  "typescript": "^5.8.3",
59
59
  "webpack": "^5.99.9",