We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bdcdaa8 commit f434db1Copy full SHA for f434db1
src/main/scala/zio/intellij/inspections/mistakes/ZIOFailThrowInspection.scala
@@ -9,14 +9,14 @@ import zio.intellij.inspections.`ZIO.fail`
9
class ZIOFailThrowInspection extends LocalInspectionTool {
10
11
override def buildVisitor(holder: ProblemsHolder, isOnTheFly: Boolean): PsiElementVisitorSimple = {
12
- case f @ `ZIO.fail`(_, b: ScThrow) =>
13
- b.expression match {
14
- case Some(expr) =>
+ case fail @ `ZIO.fail`(_, scThrow: ScThrow) =>
+ scThrow.expression match {
+ case Some(throwableExpr) =>
15
holder.registerProblem(
16
- f,
+ fail,
17
ZIOFailThrowInspection.message,
18
ProblemHighlightType.WARNING,
19
- new QuickFix(b, expr)
+ new QuickFix(scThrow, throwableExpr)
20
)
21
case None =>
22
}
0 commit comments