import ballerina/data.xmldata;
import ballerina/test;
xml x1 = xml `<A>42</A>`;
type A11 record {
int[] \#content;
};
type A12 record {int[] \#content;};
type A13 record {|
int[]|string...;
|};
public function main() {
A11|error a11 = xmldata:parseAsType(x1);
test:assertEquals(a11, {});
}
Output
error Error ("class java.lang.Long cannot be cast to class io.ballerina.runtime.
internal.values.ArrayValue (java.lang.Long is in module java.base of loader 'boo
tstrap'; io.ballerina.runtime.internal.values.ArrayValue is in unnamed module of
loader 'app')")
This should be an error message that didn't reflect the internal details.
Code
Output
This should be an error message that didn't reflect the internal details.