Skip to content

Commit 4375e68

Browse files
authored
Merge pull request scala/scala#8118 from magnolia-k/add_doc_ArraySeq#unsafeWrapArray
Added to the document about why it is 'unsafe'.
2 parents f0f57a5 + 0732c41 commit 4375e68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/scala/collection/immutable/ArraySeq.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ object ArraySeq extends StrictOptimizedClassTagSeqFactory[ArraySeq] { self =>
239239

240240
/**
241241
* Wrap an existing `Array` into an `ArraySeq` of the proper primitive specialization type
242-
* without copying.
242+
* without copying. Any changes to wrapped array will break the expected immutability.
243243
*
244244
* Note that an array containing boxed primitives can be wrapped in an `ArraySeq` without
245245
* copying. For example, `val a: Array[Any] = Array(1)` is an array of `Object` at runtime,

0 commit comments

Comments
 (0)