Nim/tests/effects
quantimnot a9701f6531
Extended side effect error messages (#18418)
* Extended side effect error messages

* Applied feedback:
- refactored `markSideEffect`
- refactored string interpolations
- single message
- skip diagnostics in `system.compiles` context

Other:
- started a test of diagnostic messages

[ci skip] Tests aren't updated yet because messaging isn't nailed down.

* - Added hints of where for side effect call locations.
- Tried to clarify the reasons.

* fix tests

* Applied PR review feedback:
  - moved collection of side effects from TSym to TContext
  - used pragma shorthand form `.sideEffect` and `.noSideEffect` in messages
  - added leading '>' to structured messages for readability
  - changed `sempass2.markSideEffect` to a proc
  - replaced `system.echo` in the test to make the test compatible with Windows

* Applied NEP1 formatting suggestion

Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
2021-07-15 20:43:57 +02:00
..
tcast_as_pragma.nim implements https://github.com/nim-lang/RFCs/issues/258 (#15503) 2020-10-06 16:47:15 +02:00
tdiagnostic_messages.nim Extended side effect error messages (#18418) 2021-07-15 20:43:57 +02:00
teffects1.nim New hint for unused exceptions in .raises (#15492) 2020-10-06 16:49:30 +02:00
teffects2.nim require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
teffects3.nim require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
teffects4.nim require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
teffects5.nim tests: Trim .nim files trailing whitespace 2015-09-04 23:04:32 +02:00
teffects6.nim updated tests to be executed 2018-11-23 11:58:28 +01:00
teffects7.nim do not track 'raise Defect' in the .raises: [] clause anymore (#14298) 2020-05-11 16:25:56 +02:00
teffects8.nim Fix handling of reraise in effect tracking (#10582) 2019-02-07 17:07:03 +01:00
teffects9.nim Add tests for #8481, #6490 and #4061 (#14083) 2020-04-23 19:52:33 +02:00
teffects10.nim effects: exclude swap() from "indirect calls" assumption (#15504) 2020-10-06 18:05:31 +02:00
tfuncs_cannot_mutate.nim close #17636 (#17643) 2021-04-06 16:20:01 +02:00
tfuncs_cannot_mutate2.nim make strict funcs analysis smarter (#18219) 2021-06-09 17:33:19 +02:00
tfuncs_cannot_mutate_simple.nim close #17636 (#17643) 2021-04-06 16:20:01 +02:00
tgcsafe.nim fixes #6955 2019-02-13 23:30:14 +01:00
tgcsafe2.nim make more tests green 2018-02-10 20:55:22 +01:00
tgcsafe3.nim fixes a critical GC safety inference bug (#10615) 2019-03-05 19:54:44 +01:00
tnosideeffect.nim fix manual to reflect reality for .nosideeffect (#16781) 2021-01-22 20:04:48 +01:00
toutparam.nim change --hint[X] => --hint:X in nim repo (avoids shell quoting issues) (#18085) 2021-05-26 09:51:48 +02:00
tsidee1.nim require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
tsidee2.nim require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
tsidee3.nim require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
tsidee4.nim require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
tstrict_funcs.nim make strict funcs analysis smarter (#18219) 2021-06-09 17:33:19 +02:00
tstrict_funcs_imports.nim strictFuncs+views: add test that imports stdlib modules (#16878) 2021-02-03 16:00:29 +01:00
tstrict_funcs_imports_js.nim strictFuncs+views: add test that imports stdlib modules (#16878) 2021-02-03 16:00:29 +01:00