Minor: Inject builtins in ControlFlowAnalyzer
This commit is contained in:
@@ -32,9 +32,11 @@ import static org.jetbrains.kotlin.types.TypeUtils.NO_EXPECTED_TYPE;
|
|||||||
|
|
||||||
public class ControlFlowAnalyzer {
|
public class ControlFlowAnalyzer {
|
||||||
@NotNull private final BindingTrace trace;
|
@NotNull private final BindingTrace trace;
|
||||||
|
@NotNull private final KotlinBuiltIns builtIns;
|
||||||
|
|
||||||
public ControlFlowAnalyzer(@NotNull BindingTrace trace) {
|
public ControlFlowAnalyzer(@NotNull BindingTrace trace, @NotNull KotlinBuiltIns builtIns) {
|
||||||
this.trace = trace;
|
this.trace = trace;
|
||||||
|
this.builtIns = builtIns;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void process(@NotNull BodiesResolveContext c) {
|
public void process(@NotNull BodiesResolveContext c) {
|
||||||
@@ -65,7 +67,7 @@ public class ControlFlowAnalyzer {
|
|||||||
private void checkSecondaryConstructor(@NotNull JetSecondaryConstructor constructor) {
|
private void checkSecondaryConstructor(@NotNull JetSecondaryConstructor constructor) {
|
||||||
JetFlowInformationProvider flowInformationProvider = new JetFlowInformationProvider(constructor, trace);
|
JetFlowInformationProvider flowInformationProvider = new JetFlowInformationProvider(constructor, trace);
|
||||||
flowInformationProvider.checkDeclaration();
|
flowInformationProvider.checkDeclaration();
|
||||||
flowInformationProvider.checkFunction(KotlinBuiltIns.getInstance().getUnitType());
|
flowInformationProvider.checkFunction(builtIns.getUnitType());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkDeclarationContainer(@NotNull BodiesResolveContext c, JetDeclarationContainer declarationContainer) {
|
private void checkDeclarationContainer(@NotNull BodiesResolveContext c, JetDeclarationContainer declarationContainer) {
|
||||||
|
|||||||
Reference in New Issue
Block a user