Skip to content

Commit

Permalink
add missing method
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregor Gololicic committed Oct 12, 2022
1 parent 77de330 commit c35b67f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lint/redundant_cast_analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ func (d *CheckCastVisitor) IsRedundantCast(expr ast.Expression, exprInferredType
return ast.AcceptExpression[bool](expr, d)
}

func (d *CheckCastVisitor) VisitVoidExpression(_ *ast.VoidExpression) bool {
return d.isTypeRedundant(sema.VoidType, d.targetType)
}

func (d *CheckCastVisitor) VisitBoolExpression(_ *ast.BoolExpression) bool {
return d.isTypeRedundant(sema.BoolType, d.targetType)
}
Expand Down

0 comments on commit c35b67f

Please sign in to comment.