Skip to content

Commit a1e7c56

Browse files
committed
Merge commit 'd322514e16' into merge-2.12-to-2.13-aug-7
2 parents ccb61a7 + 53d8150 commit a1e7c56

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

library/src/scala/Enumeration.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ import scala.util.matching.Regex
2727
* `Value` type member of the enumeration (`Value` selected on the stable
2828
* identifier path of the enumeration instance).
2929
*
30+
* Values SHOULD NOT be added to an enumeration after its construction;
31+
* doing so makes the enumeration thread-unsafe. If values are added to an
32+
* enumeration from multiple threads (in a non-synchronized fashion) after
33+
* construction, the behavior of the enumeration is undefined.
34+
*
3035
* @example {{{
3136
* // Define a new enumeration with a type alias and work with the full set of enumerated values
3237
* object WeekDay extends Enumeration {

0 commit comments

Comments
 (0)