Skip to content

Commit

Permalink
Fixed warning FUNCTION_BOOLEAN_PREFIX on operator fun
Browse files Browse the repository at this point in the history
Closes #1723
  • Loading branch information
diphtongue committed Oct 31, 2023
1 parent c1e0b37 commit abb43bf
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ fun ASTNode.isAnonymousFunction(): Boolean {

/**
* Checks if the function has boolean return type
* @return true if the function has boolean return type
*/
fun ASTNode.hasBooleanReturnType(): Boolean {
val functionReturnType = this.findChildAfter(VALUE_PARAMETER_LIST, KtNodeTypes.TYPE_REFERENCE)?.text
Expand All @@ -194,6 +195,7 @@ fun ASTNode.hasBooleanReturnType(): Boolean {

/**
* Checks if the function is an operator function
* @return true if the function is an operator function
*/
fun ASTNode.isOperatorFun(): Boolean {
val modifierListNode = this.findChildByType(MODIFIER_LIST)
Expand Down

0 comments on commit abb43bf

Please sign in to comment.