Fix KotlinReferenceImporter, add safe call to quickFixActionRanges
HighlightInfo.quickFixActionRanges is nullable in 181
This commit is contained in:
@@ -66,7 +66,7 @@ class KotlinReferenceImporter : ReferenceImporter {
|
||||
): ImportFixBase<out KtExpression>? {
|
||||
var importFix: ImportFixBase<out KtExpression>? = null
|
||||
DaemonCodeAnalyzerEx.processHighlights(editor.document, file.project, null, offset, offset) { info ->
|
||||
importFix = info.quickFixActionRanges.map { it.first.action }.filterIsInstance<ImportFixBase<*>>().firstOrNull()
|
||||
importFix = info.quickFixActionRanges?.map { it.first.action }?.filterIsInstance<ImportFixBase<*>>()?.firstOrNull()
|
||||
importFix == null
|
||||
}
|
||||
return importFix
|
||||
|
||||
Reference in New Issue
Block a user