Pattern features for next iteration
Suminda Sirinath Salpitikorala Dharmasena
sirinath1978m at gmail.com
Wed Jan 20 06:42:03 UTC 2021
Can we accomodate something like:
if (strarr instanceof String[] {var head, var... tail} wholestrarr)
or
if (strarr instanceof String[] {var head, var... tail})
or
if (strarr instanceof String[] {String head, String... tail} wholestrarr)
or
if (strarr instanceof String[] {String head, String... tail})
Also need to consider situations like:
if (true || (strarr instanceof String[] wholestrarr)) {
// what is wholestrarr here? Is it null? Is it a ClassCastException?
}
is this similar to
if (true || (strarr instanceof String[])) {
String[] wholestrarr = (String[]) strarr;
}
What about:
if ((arr instanceof int[] intarr) || (arr instanceof String[] strarr)) {
// what is intarr / strarr here? Is one of them null? Is it a
ClassCastException?
}
More information about the amber-dev
mailing list