summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorgoldenreign <regfile@yandex.ru>2016-11-07 12:14:28 +0700
committergoldenreign <regfile@yandex.ru>2016-11-07 12:14:28 +0700
commit554105ff7cc3c6a6448816f352edbee29ca92cf7 (patch)
tree831b25883fcc571a6e252cdb5eb000faaf38a33f /lib/pure
parent8b30506f724186625d8799989e5ee403d158c0b6 (diff)
downloadNim-554105ff7cc3c6a6448816f352edbee29ca92cf7.tar.gz
Add 'noSideEffect' pragma for Time type's operators
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/times.nim8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/pure/times.nim b/lib/pure/times.nim
index db09f94c1..43c97e622 100644
--- a/lib/pure/times.nim
+++ b/lib/pure/times.nim
@@ -217,21 +217,21 @@ proc `$` *(time: Time): string {.tags: [], raises: [], benign.}
   ## converts a calendar time to a string representation.
 
 proc `-`*(a, b: Time): int64 {.
-  rtl, extern: "ntDiffTime", tags: [], raises: [], benign.}
+  rtl, extern: "ntDiffTime", tags: [], raises: [], noSideEffect, benign.}
   ## computes the difference of two calendar times. Result is in seconds.
 
 proc `<`*(a, b: Time): bool {.
-  rtl, extern: "ntLtTime", tags: [], raises: [].} =
+  rtl, extern: "ntLtTime", tags: [], raises: [], noSideEffect.} =
   ## returns true iff ``a < b``, that is iff a happened before b.
   result = a - b < 0
 
 proc `<=` * (a, b: Time): bool {.
-  rtl, extern: "ntLeTime", tags: [], raises: [].}=
+  rtl, extern: "ntLeTime", tags: [], raises: [], noSideEffect.}=
   ## returns true iff ``a <= b``.
   result = a - b <= 0
 
 proc `==`*(a, b: Time): bool {.
-  rtl, extern: "ntEqTime", tags: [], raises: [].} =
+  rtl, extern: "ntEqTime", tags: [], raises: [], noSideEffect.} =
   ## returns true if ``a == b``, that is if both times represent the same value
   result = a - b == 0