Note: we have to print captured types for lambda parameters.
It is needed for nullability inference as it requires explicit types specification to work.
Later in post-processing we remove explicit type specifications for lambda parameters which have captured types
#KT-33186 fixed
previously for instance `KtClassBody` could get here as `leaf` and `leaf.parent` will return `KtClass` for it, making gutter for `KtClass` appear twice if origingal identifier and `KtClassBody` got here in different passes (one in "inner" other in "outer")
Relates to KT-8834, we continue reducing differences between old and new
inference. Note that as for `SamConversionPerArgument`, this feature
is enabled in the compiler and not in the IDE to avoid breaking code
for those users that already enabled new inference in the compiler
We've found that the BindingContext is necessary for any meaningful suppressor.
This change adds the ability for suppressors to use the BindingContext when available.
Change-Id: I14d8148ef659eca273445bf0638bcdb8c3b21f02
When using dummy resolving for creating stubs of data classes we do not have overriding information
which is needed to determine whether we need to generate synthetic members or not.
As a result of that, we may have two different versions of member scope: the first one is
resolved by dummy resolving and the second one resolved via an ordinary one.
As light methods depend on the index of them in the class body,
we can have two different methods with the same index
which breaks mapping from dummy resolved methods to normal ones.
This behaviour can be reproduced when having data class which
extends other class with some synthetic members overridden and marked as final
like described in #KT-32969
#KT-32969 fixed
Older kotlinc versions (1.1.5?) didn't generate the 'INNERCLASS' attribute for some anonymous classes, e.g. for 'crossinline' lambdas.
An example: 'Timer().schedule(1000) { foo () }'
Normally, stub loader checks if the class is 'ClassFileViewProvider.isInnerClass()', and ignores the class file.
Without the 'INNERCLASS' attribute this check fails. As the stub loaded isn't created to deal with anonymous classes nicely, it fails miserably.
This commit explicitly ignores classes with local visibility.