Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Array.appendAll() arraycopy type mismatch (#2795)
Internal `Array.appendAll` optimizations sometimes would result in returning arrays of the wrong type. ```java private interface SomeInterface { } enum OneEnum implements SomeInterface { A1, A2, A3; } enum SecondEnum implements SomeInterface { A1, A2, A3; } public static void main(String[] args) { Array<SomeInterface> empty = Array.empty(); Array<SomeInterface> copy1 = empty.appendAll(Array.<SomeInterface>of(OneEnum.values())); Array<SomeInterface> copy2 = copy1.appendAll(Array.<SomeInterface>of(SecondEnum.values())); } ``` ---- fixes: #2781
- Loading branch information