Roman Elizarov | 1f74a2d | 2018-06-29 19:19:45 +0300 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. |
| 3 | */ |
| 4 | |
Vsevolod Tolstopyatov | 74bcc92 | 2018-05-03 20:07:54 +0300 | [diff] [blame] | 5 | package cases.private |
| 6 | |
| 7 | // properties |
| 8 | private val privateVal: Any? = 1 |
| 9 | private var privateVar: Any? = 1 |
| 10 | |
| 11 | // constants |
| 12 | |
| 13 | private const val privateConst: Int = 4 |
| 14 | |
| 15 | // fun |
| 16 | |
| 17 | @Suppress("UNUSED_PARAMETER") |
| 18 | private fun privateFun(a: Any?) = privateConst |
| 19 | |
| 20 | // access |
| 21 | private class PrivateClassInPart { |
| 22 | internal fun accessUsage() { |
| 23 | privateFun(privateVal) |
| 24 | privateFun(privateVar) |
| 25 | privateFun(privateConst) |
| 26 | } |
| 27 | |
| 28 | } |