Files
kotlin-fork/idea/testData/diagnosticMessage/conflictingSubstitutions.kt
T
Alexander Udalov a9a15978e0 Rename jet -> kotlin in idea: completion, debugger, decompiler, highlighter
org.jetbrains.jet.plugin.* -> org.jetbrains.kotlin.idea.*
2015-01-13 01:15:09 +03:00

17 lines
451 B
Kotlin
Vendored

// !DIAGNOSTICS_NUMBER: 2
// !DIAGNOSTICS: TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS
// see DiagnosticMessageTest
import java.io.Closeable
class MyList<T>(t: T) {}
fun <T> getMyList(t: T): MyList<T> = MyList(t)
fun <T, E: Cloneable> writeToMyList (l: MyList< in T>, t: T) where E: Closeable {}
class Cons<T, E: Cloneable>(l: MyList<in T>, t: T)
fun test1(int: Int, any: Any) {
writeToMyList(getMyList(int), any)
Cons(getMyList(int), any)
}