Add a constraint for nested call
if there are no bounds on variables in this call return type
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
package n
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val <!UNUSED_VARIABLE!>a<!> = array(<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>array<!>())
|
||||
val <!UNUSED_VARIABLE!>a<!> = <!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>array<!>(<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>array<!>())
|
||||
val <!UNUSED_VARIABLE!>a0<!> : Array<Array<Int>> = array(array())
|
||||
val a1 = array(array<Int>())
|
||||
checkSubtype<Array<Array<Int>>>(a1)
|
||||
|
||||
Vendored
+1
-1
@@ -8,5 +8,5 @@ fun <T, C: Collection<T>> convert(src: Collection<T>, dest: C): C = throw Except
|
||||
fun test(l: List<Int>) {
|
||||
//todo should be inferred
|
||||
val r = convert(l, HashSet())
|
||||
checkSubtype<Collection<Int>>(r)
|
||||
r checkType { _<HashSet<Int>>() }
|
||||
}
|
||||
|
||||
@@ -21,5 +21,5 @@ fun <T, C: Base<T>> convert(src: HS<T>, dest: C): C = throw Exception("$src $des
|
||||
fun test(l: HS<Int>) {
|
||||
//todo should be inferred
|
||||
val r = convert(l, HS())
|
||||
checkSubtype<Base<Int>>(r)
|
||||
r checkType { _<HS<Int>>() }
|
||||
}
|
||||
Reference in New Issue
Block a user