Denis Zharkov
dcc98e3839
Improve check for statements-only postfix templates
...
Before this change the check was quite complicated
because of cases like:
for (i in 1..9)
foo(i)<caret>
It's not located in a block, but in the same time it's a stament.
So we had a tricky heuristics that if is parent is not a block, then
we should check if element isn't used as expression.
Of course this heuristics is wrong, e.g. for import/package nodes.
The solution is to reuse similar logic from BasicExpressionTypingVisitor.
it has been checked once that statement container is one of:
- KtBlockExpression
- KtContainerNodeForControlStructureBody
- KtWhenEntry
So there's no need to check anything else
#KT-14986 Fixed
#KT-14483 Fixed
2017-03-15 10:47:12 +03:00
..
2016-09-20 15:26:48 +03:00
2016-09-20 15:26:48 +03:00
2016-10-03 10:36:48 +03:00
2016-10-03 10:36:48 +03:00
2016-10-03 10:36:48 +03:00
2016-10-03 10:36:48 +03:00
2016-09-20 15:26:42 +03:00
2016-09-20 15:26:42 +03:00
2016-09-20 15:26:47 +03:00
2016-09-20 15:26:47 +03:00
2017-03-15 10:47:12 +03:00
2017-03-15 10:47:12 +03:00
2017-03-15 10:47:12 +03:00
2017-03-15 10:47:12 +03:00
2016-09-20 15:26:42 +03:00
2016-09-20 15:26:42 +03:00
2016-09-20 15:26:47 +03:00
2016-09-20 15:26:47 +03:00
2016-10-03 10:36:48 +03:00
2016-10-03 10:36:48 +03:00
2016-10-03 10:36:48 +03:00
2016-10-03 10:36:48 +03:00
2016-09-20 15:26:39 +03:00
2016-09-20 15:26:39 +03:00
2016-09-20 15:26:42 +03:00
2016-09-20 15:26:42 +03:00
2016-09-20 15:26:39 +03:00
2016-09-20 15:26:39 +03:00
2016-09-20 15:26:42 +03:00
2016-09-20 15:26:42 +03:00
2016-09-20 15:26:48 +03:00
2016-09-20 15:26:48 +03:00
2016-09-22 18:11:22 +03:00
2016-09-22 18:11:22 +03:00
2016-10-03 10:36:48 +03:00
2016-10-03 10:36:48 +03:00
2016-09-20 15:26:48 +03:00
2016-09-20 15:26:48 +03:00
2016-10-03 10:36:48 +03:00
2016-10-03 10:36:48 +03:00
2016-09-20 15:26:48 +03:00
2016-09-20 15:26:48 +03:00
2016-10-03 10:36:48 +03:00
2016-10-03 10:36:48 +03:00
2016-10-03 10:36:48 +03:00
2016-10-03 10:36:48 +03:00
2016-09-20 15:26:42 +03:00
2016-09-20 15:26:42 +03:00
2017-03-15 10:47:12 +03:00
2017-03-15 10:47:12 +03:00
2016-10-03 10:36:48 +03:00
2016-10-03 10:36:48 +03:00
2017-03-15 10:47:12 +03:00
2017-03-15 10:47:12 +03:00
2016-10-03 10:36:48 +03:00
2016-10-03 10:36:48 +03:00
2016-09-20 15:26:45 +03:00
2016-09-20 15:26:45 +03:00
2016-09-22 18:11:22 +03:00
2016-09-22 18:11:22 +03:00
2016-09-22 18:11:22 +03:00
2016-09-22 18:11:22 +03:00
2016-10-03 10:36:48 +03:00
2016-10-03 10:36:48 +03:00
2016-10-03 10:36:48 +03:00
2016-10-03 10:36:48 +03:00
2016-09-20 15:26:45 +03:00
2016-09-20 15:26:45 +03:00
2016-09-20 15:26:42 +03:00
2016-09-20 15:26:42 +03:00
2016-10-03 10:36:48 +03:00
2016-10-03 10:36:48 +03:00
2016-09-20 15:26:48 +03:00
2016-09-20 15:26:48 +03:00