https://github.com/scala/scala/pull/1861