see https://github.com/scala/scala/pull/5369/commits/50b71b6c829faabfaa46197572fc4ddd03b7e9c1