summary refs log tree commit diff stats
path: root/tests/stdlib/ttimes.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/stdlib/ttimes.nim')
-rw-r--r--tests/stdlib/ttimes.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/stdlib/ttimes.nim b/tests/stdlib/ttimes.nim
index 5794fa739..e01ab3a4f 100644
--- a/tests/stdlib/ttimes.nim
+++ b/tests/stdlib/ttimes.nim
@@ -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