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:
parent
e4415422fe
commit
2a4aa24620
4 changed files with 144 additions and 132 deletions
10
tests/pragmas/t13306.nim
Normal file
10
tests/pragmas/t13306.nim
Normal 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue