Commit Graph

10 Commits

Author SHA1 Message Date
Mark Punzalan af99ad0736 FIR checker: Report VAL_OR_VAR_ON_*_PARAMETER. 2021-05-25 20:39:34 +03:00
Dmitriy Novozhilov cd890d5833 [Test] Disable UNUSED_* diagnostics in tests which are not belong to contolFlowAnalysis suite 2021-03-29 16:12:29 +03:00
Denis Zharkov 527daced46 Optimize CFG for cases of simple variables
Parameters/vals with an immediate initializer (which we assume is a
rather common situation) do not require any kind of complicated CFA

- Unused vals can be simply determined by linear traversal of
  the pseudocode
- Definite assignment is a bit more complicated: a read-instruction of val
  can be considered as a safe if it's located *after* the first write in
  the pseudocode. It works almost always beside the case with do/while
  (see the test changed). This case will be fixed in the further commits

The test for kt897.kt will also be fixed further, all other changes
might be considered as minor as they mostly change diagnostics for
already red code
2017-10-02 10:04:16 +03:00
Denis Zharkov 4c69416f2b Report warning on unused entities that can be renamed to _
Currently it's all about lambda parameters/destructuring entries

 #KT-14347 In Progress
2016-10-24 10:19:25 +03:00
Mikhail Glukhikh e7d290f726 Refactor PSI for destructuring declarations in for: they are now children of KtParameter and not instead of it 2016-10-06 21:03:19 +03:00
Anton Sukhonosenko 141ffa27dc val / var are now forbidden on a loop multi declaration parameter #KT-6274 Fixed
VAL_OR_VAR_ON_LOOP_MULTI_PARAMETER error added
KtValVarKeywordOwner interface added for PSIs that have getValOrVarKeyword method
2015-11-03 15:30:50 +03:00
Yan Zhulanow 6db9344659 Fix compiler tests 2015-09-25 19:20:20 +03:00
Valentin Kipyatkov 7edff172a2 KT-1273 Unused assignment - should highlight assignment instead of expression
#KT-1273 Fixed
2015-05-19 23:45:59 +03:00
Svetlana Isakova 7c828b9ff7 diagnostic tests changes after collections mapping 2012-09-05 18:55:16 +04:00
Svetlana Isakova ac39daace6 KT-2667 Support multi-declarations in for-loops in control flow analysis
#KT-2667 fixed
2012-08-23 14:25:13 +04:00