[K/N][IR] Never consider a enum a final class

Unfortunately, neither descriptors nor Lazy IR have enough information
to correctly deduce a enum's modality as psi2ir does, so to avoid the RTTI generator
generating different vtables in different setups (whether a klib is cached or not),
conservatively consider all enums non-final.
This commit is contained in:
Igor Chevdar
2022-01-31 19:13:09 +05:00
parent 97a28df43d
commit 554e94a322
9 changed files with 29 additions and 9 deletions
@@ -0,0 +1,10 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
enum class Foo {
Z;
open fun bar() = 42
}
@@ -0,0 +1,6 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
fun main() = println(Foo.Z.bar())