You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix handling of arrays in java annotation arguments
Previously, the array literal argument `{ "foo", "bar" }` was typed as
an `Array["foo" | "bar"]`, which is not a subtype of the corresponding
parameter type (`Array[String]`). This lead to a crash when forcing
the annotation. This is a serious problem because in Java 9+, JFrame
contains such an annotation, therefore this affects basically any code
using Swing/AWT.
Similary an empty array `{}` was always typed as `Array[Object]` which
does not always match the parameter type, this one is trickier to fix
since the serialized annotation does not keep track of the element type
of an empty array and we don't want to force the serialization at this
point, so we use a WildcardType.
0 commit comments