Supporting function literals as selectors
This commit is contained in:
@@ -47,4 +47,26 @@ fun main(args : Array<String>) {
|
||||
<!CALLEE_NOT_A_FUNCTION!>1<!>()
|
||||
<!CALLEE_NOT_A_FUNCTION!>1<!>{}
|
||||
<!CALLEE_NOT_A_FUNCTION!>1<!>(){}
|
||||
}
|
||||
}
|
||||
|
||||
fun f() : fun Int.() : Unit = {}
|
||||
|
||||
fun main1(args : Array<String>) {
|
||||
1.{Int.() => 1}();
|
||||
{1}()
|
||||
{(x : Int) => x}(1)
|
||||
1.{Int.(x : Int) => x}(1)
|
||||
@l{1}()
|
||||
1.({Int.() => 1})()
|
||||
1.(f())()
|
||||
1.if(true){f()}else{f()}()
|
||||
1.if(true){Int.() => 1}else{f()}()
|
||||
1.if(true){Int.() => 1}else{Int.() => 1}()
|
||||
|
||||
1.<!CALLEE_NOT_A_FUNCTION!>"sdf"<!>()
|
||||
|
||||
1.<!ILLEGAL_SELECTOR!>"sdf"<!>
|
||||
1.<!ILLEGAL_SELECTOR!>{}<!>
|
||||
1.<!ILLEGAL_SELECTOR!>if (true) {}<!>
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user