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