Suggestions from expression itself to have higher priority + fixed incorect upper case naming

This commit is contained in:
Valentin Kipyatkov
2015-06-26 22:03:06 +03:00
parent 4a52247ab7
commit db144a6121
35 changed files with 72 additions and 80 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ fun a(op: (Int) -> Int) {}
fun b() {
a {it}
a {
val i = it
i
val it1 = it
it1
}
}
@@ -1,9 +1,9 @@
// WITH_RUNTIME
fun main(args: Array<String>) {
with(A()) {
val i = prop
println(i)
println(i)
val prop = prop
println(prop)
println(prop)
}
}
@@ -1,5 +1,5 @@
fun bar(): Int = 1
fun foo() {
val i = bar();
val bar = bar();
}
@@ -3,6 +3,6 @@ fun baz()
fun foo() {
if (true) {
val i = bar();
val bar = bar();
} else baz()
}
@@ -1,8 +1,8 @@
fun main(args: Array<String>) {
val myA = A()
val i = myA.prop
println(i)
println(i)
val prop = myA.prop
println(prop)
println(prop)
}
class A {
@@ -7,7 +7,7 @@ class Foo() {
fun main(args: Array<String>) {
val f = Foo()
val i = Bar().f()
println(i)
println(i)
val f1 = Bar().f()
println(f1)
println(f1)
}
@@ -4,7 +4,7 @@ class A {
fun main(args: Array<String>) {
val a = A()
val i = a.test()
val test = a.test()
val b = i
val b = test
}
@@ -4,7 +4,7 @@ class A {
fun main(args: Array<String>) {
val a = A()
val i = a.test()
val test = a.test()
val b = i
val b = test
}
@@ -5,8 +5,8 @@ interface T {
interface U: T
fun test(t: T): Int {
val i = t.foo()
val foo = t.foo()
return if (t is U)
i + 1
else i
foo + 1
else foo
}
@@ -6,9 +6,9 @@ fun foo(body: A.() -> Unit) {}
fun bar() {
foo {
val i = value
print(i)
print(i)
val value = value
print(value)
print(value)
}
foo {
@@ -1,9 +1,9 @@
fun foo(): Int {
val s: String? = ""
val i = s!!.length
val length = s!!.length
return if (true) {
i
length
} else {
i
length
}
}