@@ -14,14 +14,14 @@ interface QuickFix {
1414 fun compute (file : CompiledFile , range : Range , diagnostics : List <Diagnostic >): Either <Command , CodeAction >?
1515}
1616
17- fun diagnosticMatch (diagnostic : Diagnostic , range : Range , diagnosticTypes : HashSet <String >): Boolean =
17+ fun diagnosticMatch (diagnostic : Diagnostic , range : Range , diagnosticTypes : Set <String >): Boolean =
1818 diagnostic.range.equals(range) && diagnosticTypes.contains(diagnostic.code.left)
1919
20- fun diagnosticMatch (diagnostic : KotlinDiagnostic , startCursor : Int , endCursor : Int , diagnosticTypes : HashSet <String >): Boolean =
20+ fun diagnosticMatch (diagnostic : KotlinDiagnostic , startCursor : Int , endCursor : Int , diagnosticTypes : Set <String >): Boolean =
2121 diagnostic.textRanges.any { it.startOffset == startCursor && it.endOffset == endCursor } && diagnosticTypes.contains(diagnostic.factory.name)
2222
23- fun findDiagnosticMatch (diagnostics : List <Diagnostic >, range : Range , diagnosticTypes : HashSet <String >) =
23+ fun findDiagnosticMatch (diagnostics : List <Diagnostic >, range : Range , diagnosticTypes : Set <String >) =
2424 diagnostics.find { diagnosticMatch(it, range, diagnosticTypes) }
2525
26- fun anyDiagnosticMatch (diagnostics : Diagnostics , startCursor : Int , endCursor : Int , diagnosticTypes : HashSet <String >) =
26+ fun anyDiagnosticMatch (diagnostics : Diagnostics , startCursor : Int , endCursor : Int , diagnosticTypes : Set <String >) =
2727 diagnostics.any { diagnosticMatch(it, startCursor, endCursor, diagnosticTypes) }
0 commit comments