Add sideEffect pragma to importC procs in posix, winlean and time module (#13370)

* Add sideEffect pragma to procs in winlean
* Add sideEffect pragma to procs in posix
* Add test for #13306
* Add sideEffect pragma to procs in times
* Fixes #13306
This commit is contained in:
Tomohiro 2020-02-09 04:09:49 +09:00 • committed by GitHub
commit 2a4aa24620
4 changed files with 144 additions and 132 deletions

10
tests/pragmas/t13306.nim Normal file
View file

@ -0,0 +1,10 @@
discard """
errormsg: "'testEpo' can have side effects"
line: 8
"""
import times
func testEpo(x: float): float = epochTime() + x
echo testEpo(1.0)