From 51cdc1c98157a9c6f0f1511be90b794d0dbe0b59 Mon Sep 17 00:00:00 2001 From: De Bits Date: Tue, 17 Dec 2024 15:22:15 -0500 Subject: [PATCH] Update generics.md One can pass an array of String as well, when the function parameter is declared as --- docs/topics/generics.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/topics/generics.md b/docs/topics/generics.md index 7a0772ee7c7..4a17b5ffda1 100644 --- a/docs/topics/generics.md +++ b/docs/topics/generics.md @@ -239,8 +239,8 @@ You can project a type with `in` as well: fun fill(dest: Array, value: String) { ... } ``` -`Array` corresponds to Java's `Array`. This means that you can pass an array of `CharSequence` -or an array of `Object` to the `fill()` function. +`Array` corresponds to Java's `Array`. This means that you can pass an array of `String`, `CharSequence`, +or `Object` to the `fill()` function. ### Star-projections