Fix for KT-10729: Accessing private const field in companion object from a function in the same companion generates run-time error
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
return IntentionsBundle.message()
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package test
|
||||
|
||||
class IntentionsBundle {
|
||||
companion object {
|
||||
internal inline fun message(): String {
|
||||
return KEY + BUNDLE
|
||||
}
|
||||
|
||||
private const val BUNDLE = "K"
|
||||
protected const val KEY = "O"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user