Skip to content

Commit cb275ec

Browse files
authored
Fix ambiguous FromMilliseconds overload (#7675)
#### Summary The .NET overload resolution cannot figure out if it should pick up the Int64 or the Double overload in .NET 10. Use the ticks overload to ensure no ambiguity. #### Work Item(s) Fixes [AB#630657](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/630657)
1 parent 3141e44 commit cb275ec

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/System Application/App/Regex/src/RegexImpl.Codeunit.al

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ codeunit 3961 "Regex Impl."
327327
procedure Regex(Pattern: Text; var RegexOptions: Record "Regex Options")
328328
var
329329
TimeoutDuration: DotNet TimeSpan;
330-
MatchTimeoutInMs: Decimal;
330+
MatchTimeoutInMs: BigInteger;
331331
begin
332332
DotNetRegexOptions := RegexOptions.GetRegexOptions();
333333
MatchTimeoutInMs := RegexOptions.MatchTimeoutInMs;
@@ -336,7 +336,7 @@ codeunit 3961 "Regex Impl."
336336
if MatchTimeoutInMs > 10000 then
337337
Error(TimeoutTooHighErr);
338338

339-
DotNetRegex := DotNetRegex.Regex(Pattern, DotNetRegexOptions, TimeoutDuration.FromMilliseconds(MatchTimeoutInMs));
339+
DotNetRegex := DotNetRegex.Regex(Pattern, DotNetRegexOptions, TimeoutDuration.FromTicks(MatchTimeoutInMs * 10000));
340340
end;
341341

342342
local procedure CheckIfInstantiated()

0 commit comments

Comments
 (0)