flywind
ac32cf129b
fix #15851 ( #15852 )
...
* fix #15851
* {.cast(noSideEffect).}
(cherry picked from commit 218ff27b70 )
2020-11-09 16:21:16 +01:00
cooldome
e39b01e126
fix #15756 ( #15761 )
...
* fix #15756
* simplify test
(cherry picked from commit 610e9b2fe9 )
2020-11-05 09:06:45 +01:00
Andreas Rumpf
0426a4d85a
fixes #15508 ( #15509 )
2020-10-07 14:38:25 +02:00
Paul Tan
fa84121421
effects: exclude swap() from "indirect calls" assumption ( #15504 )
...
swap() will never call any procs passed to it, and so it can be safely
excluded from the "assume indirect calls are taken" effects tracking
rule.
2020-10-06 18:05:31 +02:00
IDF
9560e49e8f
New hint for unused exceptions in .raises ( #15492 )
...
* New hint for unused exceptions in .raises
* Fix effects test
* Further adapt teffects1.nim
2020-10-06 16:49:30 +02:00
Andreas Rumpf
92163fa330
implements https://github.com/nim-lang/RFCs/issues/258 ( #15503 )
...
* implements https://github.com/nim-lang/RFCs/issues/258
* don't be too strict with custom pragma blocks
* cast pragmas: documentation
* added most missing inference query procs to effecttraits.nim
2020-10-06 16:47:15 +02:00
flywind
af9cc2882f
use func in uri module ( #15486 )
2020-10-05 17:04:08 +02:00
Andreas Rumpf
ab405c936e
views: yet another bugfix ( #15447 )
...
* views: yet another bugfix
* views: extended the spec
* views: take into account potential hidden mutations via proc calls
2020-10-01 15:04:36 +02:00
Andreas Rumpf
2b91845f1d
refactoring, fixes yet another strictFuncs regression ( #15446 )
2020-10-01 11:16:04 +02:00
Andreas Rumpf
57b7841c18
better support for slices as views ( #15414 )
...
* moved view tests to tests/views
* refactoring
* more refactorings
* better support for system.toOpenArray for first class view types
2020-09-27 09:20:10 +02:00
Andreas Rumpf
9a110047cb
testament improvement: allow inline error messages inside test cases ( #15294 )
...
* testament support for inline error messages
* adapt teffects1.nim test to show the potential
2020-09-10 16:30:20 +02:00
Andreas Rumpf
217675cf84
borrow checking refinements ( #15290 )
...
* added basic borrowing test
2020-09-09 14:19:22 +02:00
Andreas Rumpf
2f6d04fd5d
strict funcs: use control flow information for a more precise analysis ( #15271 )
...
* strict funcs: use control flow information for a more precise analysis
* cursor inference uses control flow information
2020-09-06 22:01:39 +02:00
Andreas Rumpf
2aca748ddd
strict func: much better error messages ( #15068 )
...
* strict func: much better error messages
* documented the 'strict funcs' mode
2020-07-25 19:36:53 +02:00
Andreas Rumpf
7ca32c86bb
writing to a location counts as "side effect"; implements https://github.com/nim-lang/RFCs/issues/234 ( #15030 )
2020-07-25 15:14:28 +02:00
Andreas Rumpf
da29222f86
init checks and 'out' parameters ( #14521 )
...
* I don't care about observable stores
* enforce explicit initializations
* cleaner code for the stdlib
* stdlib: use explicit initializations
* make tests green
* algorithm.nim: set result explicitly
* remove out parameters and bring the PR into a mergable state
* updated the changelog
2020-06-23 10:53:57 +02:00
Andreas Rumpf
03c146cd93
do not track 'raise Defect' in the .raises: [] clause anymore ( #14298 )
...
* do not track 'raise Defect' in the .raises: [] clause anymore
* --panics:on maps 'raise Defect' to an unrecoverable fatal error
* make tests green again
* update the documentation too
2020-05-11 16:25:56 +02:00
Jacek Sieka
7d6cbf290a
Error -> Defect for defects ( #13908 )
...
* Error -> Defect for defects
The distinction between Error and Defect is subjective,
context-dependent and somewhat arbitrary, so when looking at an
exception, it's hard to guess what it is - this happens often when
looking at a `raises` list _without_ opening the corresponding
definition and digging through layers of inheritance.
With the help of a little consistency in naming, it's at least possible
to start disentangling the two error types and the standard lib can set
a good example here.
2020-04-28 19:56:01 +02:00
Clyybber
eca8f1d79f
Add tests for #8481 , #6490 and #4061 ( #14083 )
2020-04-23 19:52:33 +02:00
Andreas Rumpf
2a278f6eba
'.push raises: []' now also affects proc types ( #13776 )
...
* '.push raises: []' now also affects proc types
* fixes the regression
* less disruptive bugfix
* another attempt
2020-03-29 22:00:18 +02:00
Araq
ef2566218e
better error messages for Nim's effect system
2020-03-22 20:45:03 +01:00
Andreas Rumpf
c86b1fbcac
fixes a critical GC safety inference bug ( #10615 )
...
* fixes a critical GC safety inference bug
* make nimsuggest compile again
* make Nimble compile again
2019-03-05 19:54:44 +01:00
Andreas Rumpf
f55d094cf2
fixes #6955
2019-02-13 23:30:14 +01:00
LemonBoy
f23b0a7dc8
Fix handling of reraise in effect tracking ( #10582 )
...
This is the MVP in order not to get a completely useless error message
from the compiler.
Fixes #10579
2019-02-07 17:07:03 +01:00
Andreas Rumpf
0036014727
system refactorings ( #10559 )
...
* move IO subsystem into its own module; refs #10385
* make standalone test compile again
* make C++ examples compile again
* make more tests green
* make sysAssert and gcAssert work again
2019-02-06 21:00:00 +01:00
LemonBoy
3ce6b2acb9
Fix exception tracking in try blocks ( #10455 )
...
Exceptions raised inside a nkFinally/nkExcept block are not caught by
the block itself.
Fixes #3886
2019-01-27 10:32:44 +01:00
Arne Döring
1105d03644
require errormsg to be specified before file.
2018-12-11 21:23:21 +01:00
Arne Döring
e012eb1001
updated tests to be executed
2018-11-23 11:58:28 +01:00
Andreas Rumpf
ae82406c8b
make tests green again
2018-07-05 19:14:18 +02:00
Andreas Rumpf
0926754e68
make tests green again
2018-07-05 15:51:04 +02:00
Andreas Rumpf
74fe7a800b
make tests green again
2018-05-02 13:34:54 +02:00
Araq
b57d14b1ae
make more tests green
2018-02-10 20:55:22 +01:00
Andreas Rumpf
e6f0bff6dd
make tests green again
2017-10-15 09:32:53 +02:00
Araq
9af9480340
fixes #5620
2017-10-14 22:35:20 +02:00
Andreas Rumpf
f1e4d8ed74
side-effect computation now done in the proper pass; fixes #4254
2016-08-25 16:33:51 +02:00
Adam Strzelecki
e80465dacf
tests: Trim .nim files trailing whitespace
...
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
2015-09-04 23:04:32 +02:00
patrick dw
69e15ac32f
renamed writeln to writeLine in tests
2015-06-19 01:34:34 -05:00
Araq
c8dbeaa09b
make test green
2015-04-11 10:01:11 +02:00
def
546acfaf4e
Clean up tests/effects
2015-02-04 21:20:01 +01:00
Araq
a4b2762249
fixes #325
2015-01-28 19:31:36 +01:00
Araq
c4d05ca130
better effect inference
2014-11-02 14:35:13 +01:00
Araq
1a3b730bf5
made tests green
2014-09-22 01:25:13 +02:00
Araq
d7d059a686
more tests green
2014-08-31 17:23:35 +02:00
Araq
b8ce3a4175
fixes 'gcsafe'
2014-08-12 08:47:31 +02:00
Zahary Karadjov
26890b6525
make some tests red :) (i.e. print failure details while running the tester)
2014-03-16 21:05:20 +02:00
Zahary Karadjov
f0953db3ba
handle arbitrary expressions dependent on static input params in proc signatures
2014-03-16 20:42:06 +02:00
Araq
2b9311e9f1
fixes #584
2014-02-14 23:47:06 +01:00
Araq
20b5f31c03
new tester; all tests categorized
2014-01-13 02:10:03 +01:00