Skip to content

Commit

Permalink
Fix isArgAcceptable logic as per suggestion
Browse files Browse the repository at this point in the history
Co-authored-by: Petr Pučil <[email protected]>
  • Loading branch information
GreyCat and generalmimon authored Mar 7, 2024
1 parent 0e1707a commit 1701b56
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ object MethodArgType {
}
}

def isArgAcceptable(actualType: DataType, expectedType: MethodArgType) =
byDataType(actualType).getOrElse(false) == expectedType
def isArgAcceptable(actualType: DataType, expectedType: MethodArgType): Boolean =
byDataType(actualType).map((t) => t == expectedType).getOrElse(false)
}

abstract trait CommonMethods[T] extends TypeDetector {
Expand Down

0 comments on commit 1701b56

Please sign in to comment.