FIR: add test with minOf ambiguity

This commit is contained in:
Mikhail Glukhikh
2021-08-03 11:36:58 +03:00
committed by teamcityserver
parent ee0b64cb29
commit e924ee3150
5 changed files with 64 additions and 0 deletions
@@ -0,0 +1,9 @@
FILE: DailyAggregatedDoubleFactor.kt
public abstract interface DailyAggregatedDoubleFactor : R|kotlin/Any| {
}
private final fun R|DailyAggregatedDoubleFactor|.aggregateBy(reduce: R|(kotlin/Double, kotlin/Double) -> kotlin/Double|): R|kotlin/collections/Map<kotlin/String, kotlin/Double>| {
^aggregateBy R|kotlin/collections/mutableMapOf|<R|kotlin/String|, R|kotlin/Double|>()
}
public final fun R|DailyAggregatedDoubleFactor|.aggregateMin(): R|kotlin/collections/Map<kotlin/String, kotlin/Double>| {
^aggregateMin this@R|/aggregateMin|.R|/aggregateBy|(::<Ambiguity: minOf, [kotlin/comparisons/minOf, kotlin/comparisons/minOf]>#)
}
@@ -0,0 +1,7 @@
interface DailyAggregatedDoubleFactor
private fun DailyAggregatedDoubleFactor.aggregateBy(reduce: (Double, Double) -> Double): Map<String, Double> {
return mutableMapOf<String, Double>()
}
fun DailyAggregatedDoubleFactor.aggregateMin(): Map<String, Double> = aggregateBy(::<!OVERLOAD_RESOLUTION_AMBIGUITY!>minOf<!>)
@@ -5012,6 +5012,22 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest {
}
}
@Nested
@TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/intellij")
@TestDataPath("$PROJECT_ROOT")
public class Intellij {
@Test
public void testAllFilesPresentInIntellij() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/intellij"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
}
@Test
@TestMetadata("DailyAggregatedDoubleFactor.kt")
public void testDailyAggregatedDoubleFactor() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/intellij/DailyAggregatedDoubleFactor.kt");
}
}
@Nested
@TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k")
@TestDataPath("$PROJECT_ROOT")
@@ -5012,6 +5012,22 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos
}
}
@Nested
@TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/intellij")
@TestDataPath("$PROJECT_ROOT")
public class Intellij {
@Test
public void testAllFilesPresentInIntellij() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/intellij"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
}
@Test
@TestMetadata("DailyAggregatedDoubleFactor.kt")
public void testDailyAggregatedDoubleFactor() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/intellij/DailyAggregatedDoubleFactor.kt");
}
}
@Nested
@TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k")
@TestDataPath("$PROJECT_ROOT")
@@ -5012,6 +5012,22 @@ public class DiagnosisCompilerFirTestdataTestGenerated extends AbstractDiagnosis
}
}
@Nested
@TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/intellij")
@TestDataPath("$PROJECT_ROOT")
public class Intellij {
@Test
public void testAllFilesPresentInIntellij() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/intellij"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
}
@Test
@TestMetadata("DailyAggregatedDoubleFactor.kt")
public void testDailyAggregatedDoubleFactor() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/intellij/DailyAggregatedDoubleFactor.kt");
}
}
@Nested
@TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k")
@TestDataPath("$PROJECT_ROOT")