Commit Graph

10 Commits

Author SHA1 Message Date
Dmitry Petrov df6d4f358a KT-22274 report warning on labels that can't be referenced
Labels are meaningful only if they can be referenced by 'break',
'continue', or 'return' expressions.
2018-07-25 12:08:20 +03:00
Denis Zharkov 9101505eca Rework deparenthesize-like methods
- Extract private `deparenthesizeOnce` and repeat it until get the same expression

- Drop redundant parameter `deparenthesizeRecursively`

- Drop some usages of `safeDeparenthesize` in `deparenthesize`
  because even if `deparenthesize` returns null (i.e. something was not parsed)
  there is no sense in working with such expressions

Note, that `deparenthesize` now unwraps nested labels' declaration (see changes in testData),
but it seems to be reasonable
2015-05-07 22:36:15 +03:00
Denis Zharkov 44a55e5bf6 Adjust testData to new labels syntax 2015-04-29 14:03:11 +03:00
Dmitry Jemerov 252c4118eb report 'break' and 'continue' inside 'when' as errors (even if 'when' is nested in a loop) 2015-04-05 00:33:14 +03:00
Stanislav Erokhin a33450395c Resolve parenthesized element as expression 2015-03-12 17:11:43 +03:00
Svetlana Isakova ce01c61811 Rename: auto cast -> smart cast 2014-10-01 18:52:52 +04:00
Svetlana Isakova e0f37bbef0 Generate parse error on label without name '@' 2014-05-20 15:07:03 +04:00
Alexey Sedunov 3952a121fb Pseudocode: Track PSI elements which correspond to jump instructions 2014-04-17 19:00:56 +04:00
Svetlana Isakova c30259dfbe added info about smart casts to diagnostic tests 2013-12-11 19:53:50 +04:00
Andrey Breslav 3d8d92c7d3 JetDiagnosticsTest migrated to TestGenerator
- test data files renamed from *.jet to *.kt
2012-07-10 14:48:11 +04:00