`Expected failure flag` was wrongly included in list of test checks.
However, the nature of checks and this flag is different:
- any test check can pronounce the test as failed.
- `Expected failure flag` must invert the accumulated effect of all checks.
Having flag as an additional check cannot catch usecase,
when test is failed only by producing wrong stdout.
This commit extracts this flag out of check list.
^KT-59288
Add cache for reflection lookup of CLI arguments.
Replace CLI argument list with map.
The current cli parser tries to match every possible command line
argument against each command line argument, essentially in a double
loop. This fix replaces one of the loops with a map lookup. Building the
map is not expensive, and pays for itself even with a modest number of
parameters. The map is cached between calls, making subsequent calls
much cheaper. If run in a daemon, repeatedly parsing, e.g., 250
arguments, this speeds up argument parsing by a factor 20.
Disallow -shortName=value in CLI arguments.
Co-authored-by: Troels Lund <troels@google.com>
We can find corresponding parameters by the containing function symbol.
Analysis API part is covered by tests from:
* FirIdeNormalAnalysisSourceModuleResolveCandidatesTestGenerated
* FirIdeNormalAnalysisSourceModuleResolveCallTestGenerated
* FirIdeNormalAnalysisSourceModuleTypeScopeTestGenerated
^KT-64243
Fake declarations do not require any context to be resolved, so we are
able to resolve them not only for non-local classes.
They share most states with the real declaration, so mostly they are
resolved through `LLFirTargetResolver.resolveDependencies`.
The next step is KT-64363
^KT-64243 Fixed
The requirement for original declarations is to have resolved status,
so we can set at least `STATUS` phase for copied ones. This fixes the
problem that fake declarations for local declarations can have `RAW_FIR`
phase due to the copy from the original declarations, as during body
resolution all local declarations have only this phase.
Another issue: we cannot set the phase from the original declaration
as it is not guaranteed that we will have everything in the resolved
state. E.g., we can have the original declaration in `BODY_RESOLVE`
phase, but at the same time a containing class for fake declaration
can be in `STATUS` phase, for example. This means that the fake
declaration can have unresolved type annotation as it has them
from both places – from the original declaration and from the class
super type.
To simplify the code, we can just always set STATUS phase to be sure
that everything is resolved correctly.
Also, so we can optimize the logic for all phases above on Low Level FIR
level
^KT-64243
We shouldn't copy the default value from the original declaration as is
as it won't be resolved correctly in some cases. It is enough to use
STUB as it will highlight the fact that we have some default value.
In LLFirBodyTargetResolver we shouldn't try to resolve fake declarations
as they don't have bodies and everything should already be resolved
^KT-64243
This commit contains:
* correct containingFunctionSymbol for value parameter from accessors
* correct choose between originalForIntersectionOverrideAttr and
originalForSubstitutionOverrideAttr for value parameters from functions
^KT-64243
Fake overrides have annotations from a class from which type parameters
were substituted, so we have to resolve them before the declaration.
It worked before in most cases as an original containing class is a part
of the designation path, so we considered annotations from such classes
as our and just resolved them in the wrong scope without right locks
^KT-64243
IrMangledNameAndSignatureDumpHandler can dump either signature mangled
names by Fir or by descriptors, but not both at the same time. And
mangled names should be equal to preserve ABI compatibility.
^KT-57788