It's not really necessary if the information about if the lambda was a
trailing lambda can be directly saved in FirAnonymousFunctionExpression.
Removing the FIR node uncovered a couple of bugs
(UNINITIALIZED_ENUM_ENTRY, ERROR_IN_CONTRACT_DESCRIPTION) that were
caused by assuming that a lambda is always a trailing lambda.
#KT-66124
Instead, it should happen during BODY_RESOLVE phase.
This fixes KT-66150. The problem was, that `super<B>.f()` expression
in delegated constructor call was transformed during TYPES phase,
and type transformer has no special logic for allowing bare types in
super qualifiers, like the one in expressions transformer (see
`org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.FirExpressionsResolveTransformer.transformSuperReceiver`).
As a result, `B` without type argument leads to
WrongNumberOfTypeArgumentsError.
It looks incorrect that expressions in constructor call resolved
during TYPES phase, so skipping transformation of
argument list seems like the best solution here.
^KT-66150 Fixed
In most affected tests, the backend diagnostic such as "conflicting JVM
signature" or "accidental override" is directly caused by some already
existing error reported by frontend, so it doesn't make sense to check
backend diagnostics there.
Tests where that was not the case were moved/copied to
`testsWithJvmBackend`.
All of these tests were actually copied to `testsWithJvmBackend` in
866f188120, but it's unclear why they were copied instead of moved. The
test runner for `testsWithJvmBackend` correctly runs the compiler
pipeline and obtains errors reported by the backend, as opposed to the
common diagnostic tests which have a very custom code, using parts of
the old JVM backend, to obtain these diagnostics.
- `require.kt` was added to check JVM accidental override diagnostic
when using the "traits with required classes" feature, which was
removed a long time ago.
- `withErrorTypes.kt` was testing conflicting JVM declarations error (a
backend diagnostic) in presence of error types -- not very useful
scenario because the backend is not run when there's a frontend error.
Basically, just calculate them the same
way it's done for other members.
`chooseIntersectionVisibilityForSymbolsOrNull`
is named like this to prevent a JVM clash.
^KT-66046 Fixed
ZEPHYR was the first and the last experimental KonanTarget.
As ZEPHYR is now entirely removed from the codebase, the respective code
can be dropped
^KT-64517
Tests were using deprecated targets to produce ERROR-diagnostics.
Replace it with a different diagnostic
(CommonMainOrTestWithDependsOnEdges)
^KT-64517
- Restore PlatformManager constructor (used in buildscripts)
- Replace references to deprecated K/N target with 'else'
Why: buildscripts use these references and compile against older K/N
version (from bootstrap). So they can't be adjusted to newer API,
compilation will fail right away. However, they can't be kept without
changes, because bootstrap tests will fail.
^KT-64517
^KT-66500
We still want to report a readable error on using removed targets rather
than just an "Unknown target"-exception. As previous commits has removed
actual KonanTarget-entries, the check has to be adjusted to work on
plain strings.
^KT-64517
This commit inlines some helper-APIs that became redundant after
dropping deprecated targets.
Full list:
- 'threadsAreAllowed' is always 'true' now
- 'indirectBranchesAreAllowed' is always 'true' now
- 'supportsThreads' is always 'true' now
- 'isMips' is always 'false' now
- 'tlsMode' is always 'LLVMGeneralDynamicTLSModel' now
- 'getBoxRange' is always equal to 'cache.defaultRange' now
- `targetHasAddressDependency` is always true now, so memory order
is always LLVMAtomicOrderingMonotonic now
^KT-64517
Remove plain references to removed KonanTarget or Family entries. All
the changes in this commit are simple removal of some when-branches
on now dropped entries
^KT-64517
Remove sealed subclasses in KonanTarget and associated entries in
Family. This commit doesn't adjust use-sites in the codebase,
see the following commits for that
Implementation notes:
- we use @Deprecated object-stubs in place of previously used sealed
subclasses/enum entries to report readable error instead of plain
UNRESOLVED_REFERENCE on usages of deprecated FQNs.
- these object-stubs *are not* part of the respective sealed
hierarchy/enum class. This is to make it possible to remove
references to them from use-site entirely without breaking exhaustive
'when's
^KT-64517 Fixed