strict effects (#18777)
* fixes #17369 * megatest is green for --cpu:arm64 * docgen output includes more tags/raises * implemented 'effectsOf' * algorithm.nim: uses new effectsOf annotation * closes #18376 * closes #17475 * closes #13905 * allow effectsOf: [a, b] * added a test case * parameters that are not ours cannot be declared as .effectsOf * documentation * manual: added the 'sort' example * bootstrap with the new better options
This commit is contained in:
parent
72fa5833ad
commit
e0ef859130
35 changed files with 482 additions and 203 deletions
|
|
@ -20,12 +20,6 @@ Hi Andreas! How do you feel, Rumpf?
|
|||
@[0, 2, 1]
|
||||
@[0, 1, 2]
|
||||
055this should be the casehugh@["(", "+", " 1", " 2", ")"]
|
||||
caught a crash!
|
||||
caught a crash!
|
||||
caught a crash!
|
||||
caught a crash!
|
||||
caught a crash!
|
||||
caught a crash!
|
||||
[5]
|
||||
[4, 5]
|
||||
[3, 4, 5]
|
||||
|
|
@ -161,18 +155,21 @@ block tropes:
|
|||
|
||||
|
||||
block tsegfaults:
|
||||
proc main =
|
||||
try:
|
||||
var x: ptr int
|
||||
echo x[]
|
||||
when not defined(arm64):
|
||||
var crashes = 0
|
||||
proc main =
|
||||
try:
|
||||
raise newException(ValueError, "not a crash")
|
||||
except ValueError:
|
||||
discard
|
||||
except NilAccessDefect:
|
||||
echo "caught a crash!"
|
||||
for i in 0..5:
|
||||
main()
|
||||
var x: ptr int
|
||||
echo x[]
|
||||
try:
|
||||
raise newException(ValueError, "not a crash")
|
||||
except ValueError:
|
||||
discard
|
||||
except NilAccessDefect:
|
||||
inc crashes
|
||||
for i in 0..5:
|
||||
main()
|
||||
assert crashes == 6
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue