JET-140 Change function type syntax
and tests for JET-168 Improve the parser for function and tuple types as receiver types
This commit is contained in:
@@ -8,7 +8,7 @@ namespace jet121 {
|
||||
return if (answer == 2) "OK" else "FAIL"
|
||||
}
|
||||
|
||||
fun apply(arg:String, f : {String.() : Int}) : Int {
|
||||
fun apply(arg:String, f : fun String.() : Int) : Int {
|
||||
return arg.f()
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
fun foo1() : {(Int) : Int}
|
||||
fun foo1() : fun (Int) : Int
|
||||
|
||||
fun foo() {
|
||||
val h : {(Int) : Int} = foo1();
|
||||
val h : fun (Int) : Int = foo1();
|
||||
h(1)
|
||||
val m : {(Int) : Int} = {(a : Int) => 1}//foo1()
|
||||
val m : fun (Int) : Int = {(a : Int) => 1}//foo1()
|
||||
m(1)
|
||||
}
|
||||
Reference in New Issue
Block a user