Remove the "_ir" suffix. It was originally used to distinguish tests on
the JVM IR backend from the old JVM backend ("_old"), but the latter are
removed now.
Also take into account diagnostics reported via
GenerationState.collectedExtraJvmDiagnostics, and render them in the
similar format to KtDiagnostic.
Don't make the test pass if the reported list of diagnostics is empty,
because that defeats the purpose of the test.
`FragmentLocalFunctionPatchLowering.visitSimpleFunction`
uses a transformer with an overridden `visitCall`.
Inside it visits every nested call recursively in two places:
in the beginning (1, line 59), and via super method
if the current call doesn't refer to a local function (2, line 64).
It leads to a combinatorial explosion: if there are N nested calls
in one expression, then the number of `visitCall` invocations
will be `pow(2, N)`.
Thus, it will take forever to compile certain expressions. A perfect
example of a long nested call is string interpolation: string templates
are being compiled to a chain of `StringBuilder::append` calls. Here's
why IDEA-325225 happens -- the code in the issue has large string
templates, and the resulting `StringBuilder::append` chains may contain
up to 30 links, making for around 1 billion `visitCall` invocations.
However, the visiting (2) is obsolete. First, the visiting (1) will
process all the children of an expression, replacing them with the
right local function calls, if necessary, recursively, up the stack.
Second, the expression itself will be transformed, if necessary, in
that same method, after all its children are processed. That means we
can get rid of one visiting and avoid the combinatorial explosion, yet
all the local function calls will still be correctly processed.
Fixes IDEA-325225, contributes to IDEA-325146
Merge-request: KT-MR-11104
Merged-by: Alexander Kuznetsov <Aleksander.Kuznetsov@jetbrains.com>
Our current test tasks setup relies on filtering tests by tags. When a
test accidentally has more than one tag, it will never run on CI because
every test task will filter it out.
Validator will check test method tags count and fail the test if they
are more than one.
^KT-59799 In Progress
Instead of checking for only open declarations, check for overridable
declarations, since private declarations cannot be overridden even if
they are marked as open. While normally these modifiers are exclusive,
a declaration can be made open via a compiler plugin like AllOpen.
#KT-60183 Fixed
#KT-57223 Fixed
The AllOpen plugin can make private members open. But for private
properties, they can be considered stable for smart-casting if they do
not have a custom getter.
#KT-58049 Fixed
This aligns the behavior with K1 and fixes an issue when the default
value was deserialized as FirExpressionStub leading to an exception
in FIR2IR when trying to convert it to an IR expression.
#KT-60120 Fixed
#KT-59610 Fixed
Most of the declarations are made public as-is, except for some reader implementation details
and MetadataExtensions.INSTANCES.
Also added missing delegation in KmDeclarationContainerVisitor.visitExtensions
#KT-59182 Fixed
This provider is responsible for answering queries related to resolve
extensions. At the moment, this includes retrieving a KtScope with all REx
top-level declarations (moved from KtSymbolFromResolveExtensionProvider), and
retrieving information necessary to supply a GeneratedSourcesFilter for REx
generated code. Future REx-related functions can be added to this interface.
^KT-59329
- Add package and constructor listings
- Add single-scope renderForTests() implementation, including a lambda
to provide additional information about each symbol
- Remove special handling for empty scopes (interfered with single-scope
rendering)
^KT-59329
Tests can now specify the code generated by a resolve extension from
within the test's testdata. Module-level directives control whether
resolve extensions are enabled for that module, as well as package names
and source shadowing regexes. File-level directives allow a `// FILE:`
block within the testdata to be converted into a KtResolveExtensionFile
and removed from the module as a whole. (This requires a new
`ModuleStructureTransformer`, because we need to be able to entirely
remove the files in question.)
Any test can add support for these directives by calling
`KtResolveExtensionTestSupport.configure` from within their
`configureTest` stanza. This allows this functionality to be used in
conjuction with any test base class.
^KT-59329
Before this commit, we copied each type parameter during method
enhancement, while not copying the symbol. This led to symbol clashes
in MPP scenarios and various other problems.
Now we create a fully-functional type parameter copy in enhancement
and perform a substitution of old type parameters with new ones
in receiver type, value parameter types, return type,
and type parameter upper bounds.
#KT-59766 Fixed
#KT-59738 Fixed
Inject delegated constructor and other in-place initializer sub-graphs
after the delegated constructor call node. This ensures property
initialization and use is calculated correctly when there are complex
calculations for the arguments to the delegated constructor.
#KT-59708 Fixed
#KT-59832 Fixed
As this caching of dependencies would also require
to include the attributes (or name of the variant) into the coordinates
^KT-60053 Verification Pending