test added
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package m
|
||||
|
||||
import java.util.HashSet
|
||||
|
||||
// ----------------------------------
|
||||
fun <K, V> testGetOrPut(result : MutableMap<K, Set<V>>, key: K) {
|
||||
result.getOrPut(key) { HashSet() }
|
||||
}
|
||||
|
||||
fun <K,V> MutableMap<K,V>.getOrPut(key: K, defaultValue: ()-> V) : V = throw Exception("$key $defaultValue")
|
||||
|
||||
// ----------------------------------
|
||||
class Property<T: Comparable<T>>(val name: String, val default: () -> T) {}
|
||||
|
||||
fun testProperty() = Property("", { -1.toLong() })
|
||||
fun testProperty1() = Property("", { "" })
|
||||
@@ -3104,6 +3104,11 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage
|
||||
doTest("compiler/testData/diagnostics/tests/inference/typeInferenceExpectedTypeMismatch.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("useFunctionLiteralsToInferType.kt")
|
||||
public void testUseFunctionLiteralsToInferType() throws Exception {
|
||||
doTest("compiler/testData/diagnostics/tests/inference/useFunctionLiteralsToInferType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls")
|
||||
public static class NestedCalls extends AbstractDiagnosticsTestWithEagerResolve {
|
||||
public void testAllFilesPresentInNestedCalls() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user