The Hallway Track
Engineering Insights

What’s happening in this Kotlin code?

Google Developers (Google I/O) · Jun 29, 2026 · Engineering Insights

A Kotlin coding challenge demonstrates a shared-reference mutation bug when copying a user object.

“They create a new user from an existing one. Then they add a role to the new user. Somehow the original user gains that role, too.”

Google Developers posted a Kotlin coding puzzle asking viewers to spot a permissions bug where copying a user object shares a mutable role collection, so changes to the copy affect the original. It is an educational engagement post with no meaningful AI industry signal.

kotlin developer-challenge google-io

Watch / read the original source →