aboutsummaryrefslogtreecommitdiff
path: root/src/Analysis/CompilerAPI.kt
diff options
context:
space:
mode:
authorIlya Ryzhenkov <orangy@jetbrains.com>2014-07-14 15:44:32 +0400
committerIlya Ryzhenkov <orangy@jetbrains.com>2014-07-14 15:44:32 +0400
commit08e690021ce2df402134ea5cebd769183499c771 (patch)
tree5c8c95a9fcc26bb31e65cb08ac762980e46e1040 /src/Analysis/CompilerAPI.kt
parent71aacc5719cf59d2284592018177fbf8d71d12e4 (diff)
downloaddokka-08e690021ce2df402134ea5cebd769183499c771.tar.gz
dokka-08e690021ce2df402134ea5cebd769183499c771.tar.bz2
dokka-08e690021ce2df402134ea5cebd769183499c771.zip
Migrate to PackageView processing to unify all package fragments into single item.
Diffstat (limited to 'src/Analysis/CompilerAPI.kt')
-rw-r--r--src/Analysis/CompilerAPI.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Analysis/CompilerAPI.kt b/src/Analysis/CompilerAPI.kt
index bc0e6e93..b2b9a824 100644
--- a/src/Analysis/CompilerAPI.kt
+++ b/src/Analysis/CompilerAPI.kt
@@ -53,10 +53,11 @@ fun JetCoreEnvironment.analyze(messageCollector: MessageCollector): AnalyzeExhau
fun AnalyzerWithCompilerReport.analyzeAndReport(files: List<JetFile>, analyser: () -> AnalyzeExhaust) = analyzeAndReport(analyser, files)
-fun BindingContext.getPackageFragment(file: JetFile) = get(BindingContext.FILE_TO_PACKAGE_FRAGMENT, file)
+fun BindingContext.getPackageFragment(file: JetFile) : PackageFragmentDescriptor? = get(BindingContext.FILE_TO_PACKAGE_FRAGMENT, file)
fun DeclarationDescriptor.isUserCode() =
when (this) {
+ is PackageViewDescriptor -> false
is PackageFragmentDescriptor -> false
is PropertyAccessorDescriptor -> !isDefault()
is CallableMemberDescriptor -> getKind() == CallableMemberDescriptor.Kind.DECLARATION