Assert that the separation of two annotations on function type during rendering it, is any whitespace-like symbol, not only whitespace itself

E.g. in quick doc mode (HTML), it may be line break

^KT-38747 Fixed
This commit is contained in:
Victor Petukhov
2021-03-30 15:27:20 +03:00
parent cf73f182c7
commit f80b98cd0e
3 changed files with 15 additions and 1 deletions
@@ -323,7 +323,7 @@ internal class DescriptorRendererImpl(
insert(lengthBefore, '(')
} else {
if (hasAnnotations) {
assert(last() == ' ')
assert(last().isWhitespace())
if (get(lastIndex - 1) != ')') {
// last annotation rendered without parenthesis - need to add them otherwise parsing will be incorrect
insert(lastIndex, "()")