Fixed priorities for synthetic functions.
This commit is contained in:
+1
-1
@@ -89,7 +89,7 @@ public class TaskPrioritizer {
|
||||
ResolutionTaskHolder.PriorityProvider<ResolutionCandidate<D>> visibleStrategy = new ResolutionTaskHolder.PriorityProvider<ResolutionCandidate<D>>() {
|
||||
@Override
|
||||
public int getPriority(ResolutionCandidate<D> call) {
|
||||
return (isVisible(call) ? 2 : 0) + (isSynthesized(call) ? 1 : 0);
|
||||
return (isVisible(call) ? 2 : 0) + (isSynthesized(call) ? 0 : 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
var global = ""
|
||||
|
||||
fun Runnable(f: () -> Unit) = object : Runnable {
|
||||
public override fun run() {
|
||||
global = "OK"
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
Runnable { global = "FAIL" } .run()
|
||||
return global
|
||||
}
|
||||
@@ -3194,6 +3194,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
doTest("compiler/testData/codegen/box/sam/runnableAccessingClosure2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("syntheticVsReal.kt")
|
||||
public void testSyntheticVsReal() throws Exception {
|
||||
doTest("compiler/testData/codegen/box/sam/syntheticVsReal.kt");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/strings")
|
||||
|
||||
Reference in New Issue
Block a user