From 0bed8bb7d4fd2436c048ebd4851ab372cd1e6fbc Mon Sep 17 00:00:00 2001 From: "Pavel V. Talanov" Date: Thu, 23 Jul 2015 18:26:52 +0300 Subject: [PATCH] Minor: Inject builtins into OverloadingConflictResolver --- .../resolve/calls/results/OverloadingConflictResolver.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/results/OverloadingConflictResolver.java b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/results/OverloadingConflictResolver.java index 11f86bb86ad..4059d7179fd 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/results/OverloadingConflictResolver.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/results/OverloadingConflictResolver.java @@ -34,7 +34,11 @@ import java.util.Set; public class OverloadingConflictResolver { - public OverloadingConflictResolver() {} + private final KotlinBuiltIns builtIns; + + public OverloadingConflictResolver(@NotNull KotlinBuiltIns builtIns) { + this.builtIns = builtIns; + } @Nullable public MutableResolvedCall findMaximallySpecific( @@ -250,7 +254,6 @@ public class OverloadingConflictResolver { } private boolean numericTypeMoreSpecific(@NotNull JetType specific, @NotNull JetType general) { - KotlinBuiltIns builtIns = KotlinBuiltIns.getInstance(); JetType _double = builtIns.getDoubleType(); JetType _float = builtIns.getFloatType(); JetType _long = builtIns.getLongType();