Add index() to LocalSignature for more clear access

This commit is contained in:
Roman Artemev
2021-08-06 14:36:40 +03:00
committed by teamcityserver
parent 5a7298808e
commit 2574c00dd9
3 changed files with 5 additions and 3 deletions
@@ -194,6 +194,8 @@ sealed class IdSignature {
override val isLocal: Boolean
get() = true
fun index(): Int = hashSig?.toInt() ?: error("Expected index in ${render()}")
override fun topLevelSignature(): IdSignature {
error("Illegal access: Local Sig does not have toplevel (${render()}")
}