Skip to content

Commit

Permalink
Changed BidirectionalMap to work without casts
Browse files Browse the repository at this point in the history
  • Loading branch information
smilefx committed Feb 27, 2025
1 parent 3a2be37 commit e7604b3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ open class BidirectionalMap<T : Any, R : Any>(vararg elements: Pair<T, R>) {
*
* @since 0.9
*/
operator fun get(it: T): Any {
operator fun get(it: T): R {
if (containsForward(it)) return forward(it) else throw NoSuchElementException()
}

Expand Down

0 comments on commit e7604b3

Please sign in to comment.