@@ -14,14 +14,14 @@ interface QuickFix {
14
14
fun compute (file : CompiledFile , range : Range , diagnostics : List <Diagnostic >): Either <Command , CodeAction >?
15
15
}
16
16
17
- fun diagnosticMatch (diagnostic : Diagnostic , range : Range , diagnosticTypes : HashSet <String >): Boolean =
17
+ fun diagnosticMatch (diagnostic : Diagnostic , range : Range , diagnosticTypes : Set <String >): Boolean =
18
18
diagnostic.range.equals(range) && diagnosticTypes.contains(diagnostic.code.left)
19
19
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 =
21
21
diagnostic.textRanges.any { it.startOffset == startCursor && it.endOffset == endCursor } && diagnosticTypes.contains(diagnostic.factory.name)
22
22
23
- fun findDiagnosticMatch (diagnostics : List <Diagnostic >, range : Range , diagnosticTypes : HashSet <String >) =
23
+ fun findDiagnosticMatch (diagnostics : List <Diagnostic >, range : Range , diagnosticTypes : Set <String >) =
24
24
diagnostics.find { diagnosticMatch(it, range, diagnosticTypes) }
25
25
26
- fun anyDiagnosticMatch (diagnostics : Diagnostics , startCursor : Int , endCursor : Int , diagnosticTypes : HashSet <String >) =
26
+ fun anyDiagnosticMatch (diagnostics : Diagnostics , startCursor : Int , endCursor : Int , diagnosticTypes : Set <String >) =
27
27
diagnostics.any { diagnosticMatch(it, startCursor, endCursor, diagnosticTypes) }
0 commit comments