diff options
Diffstat (limited to 'src/Analysis/CompilerAPI.kt')
-rw-r--r-- | src/Analysis/CompilerAPI.kt | 3 |
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 |