KT-10772 Problem with daemon on Idea 15.0.3 & 1-dev-25

# KT-10772 Fixed
This commit is contained in:
Stanislav Erokhin
2016-01-24 12:03:27 +03:00
parent a78b08d9c7
commit aca19ed27a
3 changed files with 26 additions and 8 deletions
@@ -28,14 +28,16 @@ fun LookupTracker.record(from: LookupLocation, scopeOwner: DeclarationDescriptor
val location = from.location ?: return
val scopeKind =
when (scopeOwner) {
is ClassifierDescriptor -> ScopeKind.CLASSIFIER
is PackageFragmentDescriptor -> ScopeKind.PACKAGE
else -> throw AssertionError("Unexpected containing declaration type: ${scopeOwner.javaClass}")
}
val scopeKind = getScopeKind(scopeOwner) ?:
throw AssertionError("Unexpected containing declaration type: ${scopeOwner.javaClass}")
val position = if (requiresPosition) location.position else Position.NO_POSITION
record(location.filePath, position, scopeOwner.fqNameUnsafe.asString(), scopeKind, name.asString())
}
fun getScopeKind(scopeOwner: DeclarationDescriptor) = when (scopeOwner) {
is ClassifierDescriptor -> ScopeKind.CLASSIFIER
is PackageFragmentDescriptor -> ScopeKind.PACKAGE
else -> null
}