[IDE-NI-MIGRATE] Migrate few tests for new inference

This commit is contained in:
Mikhail Zarechenskiy
2019-05-06 04:22:44 +03:00
parent c03dfd1522
commit c95eddbbbe
23 changed files with 46 additions and 1 deletions
+2
View File
@@ -1,3 +1,5 @@
// COMPILER_ARGUMENTS: -XXLanguage:-NewInference
open class A<T>
class B<X : A<X>>()
+2
View File
@@ -1,4 +1,6 @@
// COMPILER_ARGUMENTS: -XXLanguage:-NewInference
// RUNTIME
fun none() {}
fun unitEmptyInfer() {}
+2
View File
@@ -1,3 +1,5 @@
// COMPILER_ARGUMENTS: -XXLanguage:-NewInference
package qualified_expressions
fun test(s: IntRange?) {
+2
View File
@@ -1,3 +1,5 @@
// COMPILER_ARGUMENTS: -XXLanguage:-NewInference
class Rule(val apply: () -> Unit)
fun foo() {
@@ -1,3 +1,5 @@
// COMPILER_ARGUMENTS: -XXLanguage:-NewInference
val f = listOf("").<error descr="[TYPE_INFERENCE_PARAMETER_CONSTRAINT_ERROR] Type inference failed: fun <T> Iterable<T>.firstOrNull(predicate: (T) -> Boolean): T?
cannot be applied to
receiver: List<String> arguments: (Int)
+2
View File
@@ -1,3 +1,5 @@
// COMPILER_ARGUMENTS: -XXLanguage:-NewInference
fun baz(s: String?): Int {
if (s == null) return 0
return when(<info descr="Smart cast to kotlin.String">s</info>) {
+2
View File
@@ -1,3 +1,5 @@
// COMPILER_ARGUMENTS: -XXLanguage:-NewInference
<info descr="null">open</info> class A() {
fun foo() {
if (this is B) {
+2
View File
@@ -1,3 +1,5 @@
// COMPILER_ARGUMENTS: -XXLanguage:-NewInference
fun foo(s: String) = s.length
fun baz(s: String?, r: String?): Int {
+2
View File
@@ -1,3 +1,5 @@
// COMPILER_ARGUMENTS: -XXLanguage:-NewInference
fun <K, V> testMutableMapEntry(<warning>map</warning>: MutableMap<K, V>, <warning>k1</warning>: K, <warning>v</warning>: V) {
}