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
|
||||
}
|
||||
@@ -298,7 +298,7 @@ JetFile: FunctionLiterals_ERR.jet
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(DOT)('.')
|
||||
PsiErrorElement:To specify a receiver type, use the full notation: {ReceiverType.(parameters) [: ReturnType] => ...}
|
||||
PsiErrorElement:To specify a receiverType type, use the full notation: {ReceiverType.(parameters) [: ReturnType] => ...}
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
|
||||
@@ -3,7 +3,7 @@ JetFile: Properties_ERR.jet
|
||||
PROPERTY
|
||||
PsiElement(var)('var')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Expecting property name or receiver type
|
||||
PsiErrorElement:Expecting property name or receiverType type
|
||||
PsiElement(MINUS)('-')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Property getter or setter expected
|
||||
|
||||
@@ -23,7 +23,7 @@ JetFile: With.jet
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('receiver')
|
||||
PsiElement(IDENTIFIER)('receiverType')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -63,7 +63,7 @@ JetFile: With.jet
|
||||
PsiWhiteSpace(' ')
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('receiver')
|
||||
PsiElement(IDENTIFIER)('receiverType')
|
||||
PsiElement(DOT)('.')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
|
||||
Reference in New Issue
Block a user