We should process generated property as a part of the primary constructor.
This was already implemented in 8387ea8a, but some parts were missed.
ClassDiagnosticRetriever:
* dropped relation to properties generated from constructor parameters
as they should belong to the primary constructor only
* accurate logic to fully visit an implicit primary constructor to be
able to process nested declarations (e.g., inside a super type call)
SingleNonLocalDeclarationDiagnosticRetriever:
* add relation to generated properties as now they fully belong to
the constructor
FileElementFactory:
* dropped explicit resolution of generated properties from a constructor
* added explicit resolution of generated enum members for consistency.
Effectively, this is not required because we don't have compiler
checkers for such generated enum member declarations
ClassDeclarationStructureElement:
* do not collect mapping for generated properties from constructor
* explicitly declare that we should process only ClassDelegationField
^KT-62437 Fixed
Before the code fragment analysis was extracted to the separate module,
it was impossible to modify the symbol provider, so a conflict resolver
was patched instead. The solution was not complete, though, as it only
covered call resolution ambiguities. The compiler sometime calls a
symbol provider directly, like it's done in 'BuiltinSymbolsBase'.
Relevant tests are in the IntelliJ project (see singleBreakpoint/
conflictingStdlib.kt).
^KTIJ-27329 Fixed
See the `privateInFile.fir.kt` test.
Type mismatches are simply confusing.
`inheritorOfExpectSealedClass.out`
reports unresolved reference probably
because now it resolves into the expect
declaration, rather than the actual one.
K1 doesn't report UNRESOLVED_REFERENCE
in this case. But this is red code
anyway. And this behavior still
depends on the order in which the compiler
receives both the declarations.
^KT-59927
^KT-62567
We only see the redeclaration
diagnostics on the declarations inside
the second file, because of
`FirRecorder::visitRegularClass`.
`data.state.classifierContainerFileMap`
references the last file, so
when checking the visibility of
the first `private class C { ... }`
(when collecting declarations that
conflict with the second `private class C`)
the provider returns the second file
instead of the first one, so the class
behaves as it is visible, and
`collectTopLevelConflict` returns in
this case.
As for why `INVISIBLE_*`s are reported
inside the first file: this is because
`data.state.classifierMap` stores the
last classifier it sees instead of
the first one.
^KT-62537
Access to `SLRUCache` is a bottleneck when we call `getLineNumber`.
We are very rarely going to access the same offset. This change
speeds up backend by approximately 0.43%.