New J2K: implement mutability inference in post-processing

#KT-24293 fixed
#KT-19603 fixed
This commit is contained in:
Ilya Kirillov
2019-09-02 18:56:50 +03:00
parent c28515be59
commit f61bb5aa39
81 changed files with 1263 additions and 231 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
import java.io.File
internal fun foo(file: File?): List<String> {
return emptyList()
internal fun foo(file: File?): List<String?>? {
return emptyList<String>()
}
@@ -1,7 +1,7 @@
import java.io.File
class C {
private fun memberFun(file: File?) {}
private fun memberFun(file: File) {}
companion object {
@JvmStatic
+1 -1
View File
@@ -1,5 +1,5 @@
package to
fun foo(): String {
fun foo(): String? {
return ""
}
@@ -1,6 +1,6 @@
package to
@SomeAnnotation
fun foo(): String {
fun foo(): String? {
return ""
}
+3 -3
View File
@@ -23,12 +23,12 @@ class A {
return JetRefactoringUtil.formatPsiMethod(element as PsiMethod, true, false)
}
protected fun getDimensionServiceKey(): String {
protected fun getDimensionServiceKey(): String? {
return "#org.jetbrains.kotlin.idea.refactoring.safeDelete.KotlinOverridingDialog"
}
fun getSelected(): ArrayList<UsageInfo> {
val result: ArrayList<UsageInfo> = ArrayList<UsageInfo?>()
fun getSelected(): ArrayList<UsageInfo>? {
val result: ArrayList<UsageInfo> = ArrayList<UsageInfo>()
for (i in 0 until myChecked.length) {
if (myChecked.get(i)) {
result.add(myOverridingMethods.get(i))