Commit Graph

5 Commits

Author SHA1 Message Date
Marco Pennekamp 5909b191a5 [FIR] KT-54507 Report REDUNDANT_MODALITY_MODIFIER for open interface
- `REDUNDANT_MODIFIER_FOR_TARGET` is already reported for `open`
  interfaces, but for consistency and IDE support, the compiler now
  reports `REDUNDANT_MODALITY_MODIFIER` as well via the extended
  checker.
- `REDUNDANT_MODIFIER_FOR_TARGET` cannot be disabled for this case
  because it's reported via a basic checker while
  `REDUNDANT_MODALITY_MODIFIER` is reported via an extended checker.
- Rename `implicitModality` to `redundantModalities` and return a set of
  modalities. The idea of a *single* implicit/redundant modality doesn't
  stand up to scrutiny. For example, for interfaces with `ABSTRACT`
  implicit modality, `OPEN` is also a redundant modifier. But this is
  not necessarily the case for all kinds of declarations.
  Hypothetically, if it was possible to declare a class that is abstract
  by default, adding an `open` modifier to that class would not be
  redundant, as it would make the class instantiable.
2023-02-16 10:50:48 +00:00
Nikolay Lunyak 5994a99dbb [FIR] KT-54507: Report redundant for abstract interfaces
^KT-54507 Fixed

Merge-request: KT-MR-8490
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com>
2023-01-30 16:45:20 +00:00
Dmitriy Novozhilov c3060e861f [FIR] Add expect actual checker 2021-07-20 10:33:49 +03:00
Jinseong Jeon 39df3e2b0a FIR checker: introduce member function checker 2021-01-15 14:38:35 +03:00
Dmitriy Novozhilov 298e27bdac [Test] Migrate AbstractExtendedFirDiagnosticsTest to new infrastructure 2020-12-21 18:34:57 +03:00