No KotlinType reference in AddArrayOfTypeFix

This commit is contained in:
Valentin Kipyatkov
2016-03-29 17:13:45 +03:00
parent 3905344530
commit 1754b58e37
@@ -25,9 +25,9 @@ import org.jetbrains.kotlin.psi.KtPsiFactory
import org.jetbrains.kotlin.psi.createExpressionByPattern
import org.jetbrains.kotlin.types.KotlinType
class AddArrayOfTypeFix(expression: KtExpression, val expectedType: KotlinType) : KotlinQuickFixAction<KtExpression>(expression) {
class AddArrayOfTypeFix(expression: KtExpression, expectedType: KotlinType) : KotlinQuickFixAction<KtExpression>(expression) {
val prefix = if (KotlinBuiltIns.isArray(expectedType)) {
private val prefix = if (KotlinBuiltIns.isArray(expectedType)) {
"arrayOf"
}
else {
@@ -37,7 +37,6 @@ class AddArrayOfTypeFix(expression: KtExpression, val expectedType: KotlinType)
}
override fun getText() = "Add $prefix wrapper"
override fun getFamilyName() = "Add arrayOf wrapper"
override fun invoke(project: Project, editor: Editor?, file: KtFile) {