-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Conversation
What happens when one passes an |
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.
fine w/ me. I say we merge this for M5. @lrytz have you been following this? tentatively assigning to you for final signoff. |
There was a problem hiding this 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
This operation is deprecated and produces a deprecation warning similar
to the one for
Predef.copyArrayToImmutableIndexedSeq.
which serves thesame purpose for the non-varargs case.
Fixes scala/bug#11024