Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | fixes #23775; injectdestructors now handles discardable statements (#23780) | ringabout | 2024-07-02 | 1 | -0/+24 |
| | | | fixes #23775 | ||||
* | fix noreturn/implicit discard check logic (#23681) | metagn | 2024-06-05 | 1 | -0/+30 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | fixes #10440, fixes #13871, fixes #14665, fixes #19672, fixes #23677 The false positive in #23677 was caused by behavior in `implicitlyDiscardable` where only the last node of `if`/`case`/`try` etc expressions were considered, as in the final node of the final branch (in this case `else`). To fix this we use the same iteration in `implicitlyDiscardable` that we use in `endsInNoReturn`, with the difference that for an `if`/`case`/`try` statement to be implicitly discardable, all of its branches must be implicitly discardable. `noreturn` calls are also considered implicitly discardable for this reason, otherwise stuff like `if true: discardableCall() else: error()` doesn't compile. However `endsInNoReturn` also had bugs, one where `finally` was considered in noreturn checking when it shouldn't, another where only `nkIfStmt` was checked and not `nkIfExpr`, and the node given for the error message was bad. So `endsInNoReturn` now skips over `skipForDiscardable` which no longer contains `nkIfStmt`/`nkCaseStmt`/`nkTryStmt`, stores the first encountered returning node in a var parameter for the error message, and handles `finally` and `nkIfExpr`. Fixing #23677 already broke a line in `syncio` so some package code might be affected. | ||||
* | enforce void for nkWhileStmt [backport: 2.0] (#21170) | ringabout | 2022-12-24 | 1 | -0/+11 |
| | | | enforce void for nkWhileStmt | ||||
* | fixes #13583; enforce void for `nkWhileStmt` (#20947) | ringabout | 2022-11-29 | 1 | -0/+34 |
| | | | | | * fixes #13583; enfore void for nkWhileStmt * one more case | ||||
* | revert discardable transformation (#10905) | Andreas Rumpf | 2019-04-21 | 1 | -0/+20 |
| | | | | | | | | | | * Revert "Properly wrap discarded statements (#10322)" This reverts commit 15584879b91e14565156ca140eef1dc100cf34c4. * add test for implicit discard after defer * enable t10241 again * make C++ tests green again | ||||
* | lots of small changes | Arne Döring | 2018-12-11 | 1 | -0/+3 |
| | |||||
* | updated tests to be executed | Arne Döring | 2018-11-23 | 1 | -0/+7 |
| | |||||
* | fix #9726 (#9765) | Arne Döring | 2018-11-20 | 1 | -0/+8 |
| | |||||
* | make tests green again | Andreas Rumpf | 2018-07-05 | 1 | -1/+1 |
| | |||||
* | Remove expr/stmt (#5857) | Arne Döring | 2017-07-25 | 1 | -1/+1 |
| | |||||
* | tests: Trim .nim files trailing whitespace | Adam Strzelecki | 2015-09-04 | 1 | -2/+2 |
| | | | | via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} + | ||||
* | fixes #942 | Araq | 2014-03-05 | 1 | -0/+16 |
| | |||||
* | new tester; all tests categorized | Araq | 2014-01-13 | 1 | -0/+13 |