Thanks for the clear report. This was an Objo compiler bug, not user error.
Var retVal As New Array(Of String) should be valid. The parser was preserving the Of String part, but the type checker was not resolving New Array(Of String) as Array(Of String) in the same way it already handled some other generic container constructors. That made the declaration briefly look like an untyped raw Array, which triggered the misleading “Array type annotations must specify an element type” diagnostic.
This is fixed for the next release: https://feedback.objo.dev/bug/683
I also added broader regression coverage for this form, including:
The workaround until the next build is either:
Var retVal As Array(Of String) = New Array(Of String)
or, for an empty array:
Var retVal As Array(Of String)
or:
Var retVal() As String