K1: don't filter Enum.entries in tower to report error later

After this commit we:
- preserve Enum.entries synthetic property in tower even in case the bound feature is OFF
- report an error on Enum.entries call in specific checker if the feature is OFF
- give this synthetic property lower priority, no matter feature ON or OFF

#KT-55251 Fixed
This commit is contained in:
Mikhail Glukhikh
2023-01-19 11:49:11 +01:00
committed by Space Team
parent 793df6234e
commit 565adf3075
11 changed files with 77 additions and 16 deletions
+10 -1
View File
@@ -1,4 +1,13 @@
compiler/testData/cli/jvm/enumEntriesForJavaNotEnabled.kt:4:49: error: unresolved reference: entries
warning: ATTENTION!
This build uses unsafe internal compiler arguments:
-XXLanguage:-EnumEntries
This mode is not recommended for production use,
as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk!
compiler/testData/cli/jvm/enumEntriesForJavaNotEnabled.kt:4:49: error: the feature "enum entries" is only available since language version 1.9
val entries = java.util.concurrent.TimeUnit.entries
^
COMPILATION_ERROR