Working on type inference for function literals
This commit is contained in:
@@ -19,7 +19,7 @@ fun test(l : java.util.List<Int>) {
|
||||
Collections.<error>emptyList</error>
|
||||
Collections.emptyList<Int>
|
||||
Collections.emptyList<Int>()
|
||||
Collections.emptyList<error>()</error>
|
||||
Collections.emptyList()
|
||||
|
||||
Collections.singleton<Int>(1) : Set<Int>?
|
||||
Collections.singleton<Int><error>(1.0)</error>
|
||||
@@ -43,7 +43,7 @@ fun test(l : java.util.List<Int>) {
|
||||
c : java.lang.Comparable<Int>?
|
||||
|
||||
// Collections.sort<Integer>(ArrayList<Integer>())
|
||||
xxx.Class<error>()</error>
|
||||
xxx.<error>Class</error>()
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
// One of the two passes is making a scope and turning vals into functions
|
||||
// See KT-76
|
||||
|
||||
namespace x
|
||||
|
||||
val b : Foo
|
||||
val a1 = b.compareTo(2)
|
||||
|
||||
class Foo() {
|
||||
fun compareTo(other : Byte) : Int
|
||||
fun compareTo(other : Char) : Int
|
||||
}
|
||||
Reference in New Issue
Block a user