Skip to content

Conversation

@lrytz
Copy link
Member

@lrytz lrytz commented Jun 24, 2020

No description provided.

@lrytz lrytz requested a review from retronym June 24, 2020 10:00
@scala-jenkins scala-jenkins added this to the 2.12.13 milestone Jun 24, 2020
}
}
that.asInstanceOf[scala.Traversable[(A,B)]] foreach adder
that.asInstanceOf[GenTraversableOnce[(A,B)]] foreach adder
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure here, but it seemed a bit strange for this code to be different than ++ above

@lrytz
Copy link
Member Author

lrytz commented Jun 24, 2020

@retronym I also don't really grok what the new castToThat methods are good for, maybe you can add a comment?

@retronym
Copy link
Member

@retronym I also don't really grok what the new castToThat methods are good for, maybe you can add a comment?

Done. They exist to ensure we only cast suitable values to That. One of the bugs I fixed was casting a totally unrelalated type to HashMap[A, B] in a code path that wasn't tested, so I was looking for ways to be a bit safer with the casts.

@lrytz lrytz merged commit cbe6ade into scala:2.12.x Jun 25, 2020
@SethTisue SethTisue modified the milestones: 2.12.13, 2.12.12 Jun 25, 2020
hamzaremmal pushed a commit to hamzaremmal/scala3 that referenced this pull request May 2, 2025
hamzaremmal pushed a commit to scala/scala3 that referenced this pull request May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants