mirror of
https://github.com/nim-lang/Nim.git
synced 2026-05-03 04:24:45 +00:00
Fix regression in std/times (#22155)
* Add simple test case Just so the regression doesn't happen again * Specify initDateTime is gcsafe in the forward declarations
This commit is contained in:
@@ -766,3 +766,7 @@ block: # ttimes
|
||||
check dt.format("GGGG") == "2023"
|
||||
check dt.format("dddd 'KW'V GGGG") == "Thursday KW1 2023"
|
||||
|
||||
block: # Can be used inside gcsafe proc
|
||||
proc test(): DateTime {.gcsafe.} =
|
||||
result = "1970".parse("yyyy")
|
||||
doAssert test().year == 1970
|
||||
|
||||
Reference in New Issue
Block a user