aboutsummaryrefslogtreecommitdiff
path: root/src/Analysis
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-02-13 12:17:47 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-02-13 12:17:47 +0100
commitf2fd617b921f7a9bee826a271213e17586e6949c (patch)
tree28ddb97c1c5ef040da3415ff85c03519cfa0b53c /src/Analysis
parentf3bed4012efe860f02dfdb7c73c0a7fe2d6bcbfa (diff)
downloaddokka-f2fd617b921f7a9bee826a271213e17586e6949c.tar.gz
dokka-f2fd617b921f7a9bee826a271213e17586e6949c.tar.bz2
dokka-f2fd617b921f7a9bee826a271213e17586e6949c.zip
tests use the same implementation of DocumentationModule building logic as production code
Diffstat (limited to 'src/Analysis')
-rw-r--r--src/Analysis/AnalysisEnvironment.kt4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Analysis/AnalysisEnvironment.kt b/src/Analysis/AnalysisEnvironment.kt
index 1bf3575f..279489e7 100644
--- a/src/Analysis/AnalysisEnvironment.kt
+++ b/src/Analysis/AnalysisEnvironment.kt
@@ -36,7 +36,9 @@ public class AnalysisEnvironment(val messageCollector: MessageCollector, body: A
public fun withContext<T>(processor: (JetCoreEnvironment, ResolveSession) -> T): T {
val environment = JetCoreEnvironment.createForProduction(this, configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES)
val resolveSession = environment.analyze()
- resolveSession.forceResolveAll()
+ if (environment.getSourceFiles().isNotEmpty()) {
+ resolveSession.forceResolveAll()
+ }
return processor(environment, resolveSession)
}