New J2K: convert all custom post-processing to applicability based ones

This commit is contained in:
Ilya Kirillov
2019-09-17 18:16:20 +03:00
parent 509fcb17c7
commit 3724e2bb02
8 changed files with 72 additions and 134 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ class Test(str: String) {
fun test() {
sout("String")
val test: String = "String2"
val test = "String2"
sout(test)
sout(dummy(test))
test.Test(test)
+1 -1
View File
@@ -14,7 +14,7 @@ class Test(str: String?) {
fun test() {
sout("String")
val test: String = "String2"
val test = "String2"
sout(test)
sout(dummy(test))
test.Test(test)
@@ -1,7 +1,7 @@
internal class Foo {
fun foo(o: HashSet<*>) {
val o2: HashSet<*> = o
var foo: Int = 0
var foo = 0
foo = o2.size
}
}
@@ -2,17 +2,15 @@
// !specifyLocalVariableTypeByDefault: true
internal class Library {
fun call() {}
val string: String
get() = ""
}
internal class User {
fun main() {
val lib: Library = Library()
val lib = Library()
lib.call()
lib.string.isEmpty()
Library().call()
Library().string.isEmpty()
}
@@ -1,5 +1,6 @@
// !specifyLocalVariableTypeByDefault: true
fun foo() {
val i: Int = 1
val s: String = ""
val i = 1
val s = ""
}
@@ -1,7 +1,7 @@
// !specifyLocalVariableTypeByDefault: true
fun foo(list: List<String?>) {
val array: IntArray = IntArray(10)
val array = IntArray(10)
for (i: Int in 0..9) {
array[i] = i
}