Pattern: Use of Pair
constructor
Issue: -
Detects the usage of the Pair
constructor to create pairs of values. Use the to
syntax instead.
Example of incorrect code:
val pair = Pair(1, 2)
Example of correct code:
val pair = 1 to 2
Pattern: Use of Pair
constructor
Issue: -
Detects the usage of the Pair
constructor to create pairs of values. Use the to
syntax instead.
Example of incorrect code:
val pair = Pair(1, 2)
Example of correct code:
val pair = 1 to 2