From 07be1791ba52d03dd2026c14ca34e5acc6ef9213 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Sun, 11 Dec 2022 01:57:19 +0800 Subject: [PATCH] fix #21045; getTime with vmopsDanger is broken; alternative to #21054 (#21056) * fix #21045 getTime with vmopsDanger is broken; alternative to #21054 * typo --- compiler/ccgexprs.nim | 1 + compiler/vmconv.nim | 13 +++++++++++- compiler/vmops.nim | 5 +++-- lib/pure/times.nim | 44 ++++++++++++++++++++++----------------- tests/vm/tvmopsDanger.nim | 10 +++++++++ 5 files changed, 51 insertions(+), 22 deletions(-) create mode 100644 tests/vm/tvmopsDanger.nim diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim index 6d8cbd5442..2a4335144a 100644 --- a/compiler/ccgexprs.nim +++ b/compiler/ccgexprs.nim @@ -3283,6 +3283,7 @@ proc getNullValueAux(p: BProc; t: PType; obj, constOrNil: PNode, if constOrNil != nil: for i in 1.. low(Time) \ No newline at end of file