Remove redundant direct usages of the ScriptDefinition in compiler
plus some refactoring around definition extraction
This commit is contained in:
@@ -84,6 +84,8 @@ public class ResolveSession implements KotlinCodeAnalyzer, LazyClassContext {
|
||||
|
||||
private final SyntheticResolveExtension syntheticResolveExtension;
|
||||
|
||||
private Project project;
|
||||
|
||||
@Inject
|
||||
public void setAnnotationResolve(AnnotationResolver annotationResolver) {
|
||||
this.annotationResolver = annotationResolver;
|
||||
@@ -190,6 +192,8 @@ public class ResolveSession implements KotlinCodeAnalyzer, LazyClassContext {
|
||||
danglingAnnotations = storageManager.createMemoizedFunction(file -> createAnnotations(file, file.getDanglingAnnotations()));
|
||||
|
||||
syntheticResolveExtension = SyntheticResolveExtension.Companion.getInstance(project);
|
||||
|
||||
this.project = project;
|
||||
}
|
||||
|
||||
private LazyAnnotations createAnnotations(KtFile file, List<KtAnnotationEntry> annotationEntries) {
|
||||
@@ -451,6 +455,11 @@ public class ResolveSession implements KotlinCodeAnalyzer, LazyClassContext {
|
||||
return platformDiagnosticSuppressor;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Project getProject() {
|
||||
return project;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void assertValid() {
|
||||
module.assertValid();
|
||||
|
||||
Reference in New Issue
Block a user