Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy arrays that are explicitly passed as varargs with : _* #6970

Merged
merged 1 commit into from
Aug 10, 2018

Conversation

szeiger
Copy link
Member

@szeiger szeiger commented Jul 24, 2018

This operation is deprecated and produces a deprecation warning similar
to the one for Predef.copyArrayToImmutableIndexedSeq. which serves the
same purpose for the non-varargs case.

Fixes scala/bug#11024

@scala-jenkins scala-jenkins added this to the 2.13.0-M5 milestone Jul 24, 2018
@julienrf
Copy link
Contributor

What happens when one passes an Array to a Java varargs method?

@szeiger
Copy link
Member Author

szeiger commented Jul 25, 2018

Java varargs are unaffected, all arrays are passed unmodified.

This operation is deprecated and produces a deprecation warning similar
to the one for `Predef.copyArrayToImmutableIndexedSeq.` which serves the
same purpose for the non-varargs case.
@SethTisue
Copy link
Member

fine w/ me. I say we merge this for M5.

@lrytz have you been following this? tentatively assigning to you for final signoff.

@SethTisue SethTisue added the prio:blocker release blocker (used only by core team, only near release time) label Aug 7, 2018
Copy link
Member

@lrytz lrytz left a comment

Choose a reason for hiding this comment

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

LGTM otherwise. I also think this is the right step.

@@ -435,7 +435,8 @@ trait Definitions extends api.StandardDefinitions {
def elementType(container: Symbol, tp: Type): Type = elementExtract(container, tp)

// collections classes
private[this] lazy val isNewCollections = getClassIfDefined("scala.collection.IterableOnce") != NoSymbol
private[this] lazy val _isNewCollections = getClassIfDefined("scala.collection.IterableOnce") != NoSymbol
private[scala] def isNewCollections = _isNewCollections
Copy link
Member

Choose a reason for hiding this comment

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

why not private[scala] lazy val ...? Or just make a public lazy val, we don't need to worry about visibility in reflect.internal.

Copy link
Member Author

Choose a reason for hiding this comment

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

A non-private[this] val leaks into JavaUniverseForce

@SethTisue SethTisue added the release-notes worth highlighting in next release notes label Aug 10, 2018
@SethTisue SethTisue merged commit 7c4b8a1 into scala:2.13.x Aug 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prio:blocker release blocker (used only by core team, only near release time) release-notes worth highlighting in next release notes
Projects
None yet
5 participants