Rewritten NameValidatorImpl to be both more efficient and more correct

This commit is contained in:
Valentin Kipyatkov
2015-06-26 21:06:32 +03:00
parent df5f035760
commit de2378f909
10 changed files with 72 additions and 65 deletions
@@ -8,12 +8,12 @@ class A(val a: Int) {
}
fun test() {
val a = A(1)
val a1 = A(2)
a.foo(a.a + a1.a)
val a2 = A(1)
val a3 = A(2)
a2.foo(a2.a + a3.a)
with(A(1)) {
val a1 = A(2)
foo(this.a + a1.a)
foo(a + a1.a)
val a = A(2)
this.foo(this.a + a.a)
}
@@ -8,12 +8,12 @@ class A(val a: Int) {
}
fun test() {
val a = A(1)
val a1 = A(2)
a.foo(a.a + a1.a)
val a2 = A(1)
val a3 = A(2)
a2.foo(a2.a + a3.a)
with(A(1)) {
val a1 = A(2)
foo(this.a + a1.a)
foo(a + a1.a)
val a = A(2)
this.foo(this.a + a.a)
}
@@ -0,0 +1,12 @@
class For {
var xxx: For? = null
}
fun foo(f: For) {
<selection>f.xxx</selection>
if (true) {
val xxx = 1
}
}
@@ -0,0 +1,12 @@
class For {
var xxx: For? = null
}
fun foo(f: For) {
val xxx1 = f.xxx
if (true) {
val xxx = 1
}
}