[AllOpen] Do not open members of non-class type classes

The logic of the AllOpen compiler plugin for opening classes and opening
declarations of classes does not match. This leads to declarations being
open when the containing class is not open. There is a warning reported,
for exactly this situation.

However, creating meta-annotations of AllOpen annotation is quite common
in certain ecosystems. In particular, Spring. This can lead to a warning
if the meta-annotation has properties.

Align the class kind check for members, so they are not opened if the
containing class cannot be opened.

^KT-63507 Fixed
This commit is contained in:
Brian Norman
2024-03-06 11:04:30 -06:00
committed by Space Team
parent bdaacb9427
commit 6bf987e772
5 changed files with 3 additions and 19 deletions
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// WITH_STDLIB
// ISSUE: KT-63507