Fix formatting in some of test data files.
Adapted from https://github.com/develar/kotlin/commit/a9e0a42fb1347fa8e21c86b5a073ef8a7c873da0.
This commit is contained in:
+3
-3
@@ -1,7 +1,7 @@
|
||||
package foo
|
||||
|
||||
fun apply(i : Int, f : Int.(Int) -> Int) = i.f(1);
|
||||
fun apply(i: Int, f: Int.(Int) -> Int) = i.f(1);
|
||||
|
||||
fun box() : Boolean {
|
||||
return (apply(1, {i -> i + this})) == 2
|
||||
fun box(): Boolean {
|
||||
return apply(1, {i -> i + this}) == 2
|
||||
}
|
||||
+13
-15
@@ -1,26 +1,24 @@
|
||||
package foo
|
||||
|
||||
class Foo {
|
||||
|
||||
fun blah(value: Int): Int {
|
||||
return value + 1
|
||||
}
|
||||
|
||||
fun blah(value: Int): Int {
|
||||
return value + 1
|
||||
}
|
||||
}
|
||||
|
||||
val Foo.fooImp : Int
|
||||
get() {
|
||||
return blah(5)
|
||||
}
|
||||
val Foo.fooImp: Int
|
||||
get() {
|
||||
return blah(5)
|
||||
}
|
||||
|
||||
val Foo.fooExp : Int
|
||||
get() {
|
||||
return this.blah(10)
|
||||
}
|
||||
val Foo.fooExp: Int
|
||||
get() {
|
||||
return this.blah(10)
|
||||
}
|
||||
|
||||
fun box() : Boolean {
|
||||
fun box(): Boolean {
|
||||
var a = Foo()
|
||||
if (a.fooImp != 6) return false
|
||||
if (a.fooExp != 11) return false
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package foo
|
||||
|
||||
open class A(var a : Int) {
|
||||
open class A(var a: Int) {
|
||||
|
||||
open fun Int.modify() : Int {
|
||||
open fun Int.modify(): Int {
|
||||
return this * 3;
|
||||
}
|
||||
|
||||
fun eval() = a.modify();
|
||||
}
|
||||
|
||||
class B(a : Int) : A(a) {
|
||||
override fun Int.modify() : Int {
|
||||
class B(a: Int): A(a) {
|
||||
override fun Int.modify(): Int {
|
||||
return this - 2;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user