Minor, inline LexicalScope.Companion.empty

This commit is contained in:
Alexander Udalov
2016-07-01 18:57:34 +03:00
parent 969ff43152
commit 6baf3ae737
7 changed files with 12 additions and 16 deletions
@@ -113,7 +113,7 @@ class FileScopeFactory(
val importingScope = LazyImportScope(scope, explicitImportResolver, LazyImportScope.FilteringKind.ALL, "Explicit imports in $debugName")
val lexicalScope = LexicalScope.empty(importingScope, packageFragment)
val lexicalScope = LexicalScope.Empty(importingScope, packageFragment)
val importResolver = object : ImportResolver {
override fun forceResolveAllImports() {
@@ -60,7 +60,7 @@ class LazyAnnotations(
entry: KtAnnotationEntry ->
val descriptor = LazyAnnotationDescriptor(c, entry)
val target = entry.getUseSiteTarget()?.getAnnotationUseSiteTarget()
val target = entry.useSiteTarget?.getAnnotationUseSiteTarget()
AnnotationWithTarget(descriptor, target)
}
@@ -132,8 +132,9 @@ class LazyAnnotationDescriptor(
private val source = annotationEntry.toSourceElement()
val scope = if (c.scope.ownerDescriptor is PackageFragmentDescriptor) {
LexicalScope.Companion.empty(c.scope, FileDescriptorForVisibilityChecks(source, c.scope.ownerDescriptor))
} else {
LexicalScope.Empty(c.scope, FileDescriptorForVisibilityChecks(source, c.scope.ownerDescriptor))
}
else {
c.scope
}