Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pebvariable annotations for arrays don't set the correct type for objects inside the array #105

Closed
grishka opened this issue Jul 10, 2021 · 2 comments
Labels
Milestone

Comments

@grishka
Copy link

grishka commented Jul 10, 2021

If you write this:

{# @pebvariable name="results" type="smithereen.data.SearchResult[]" #}
{% for res in results %}
...
{% endfor %}

The plugin won't pick up the type of the objects in the array, instead thinking they're java.lang.Objects:
Снимок экрана 2021-07-10 в 13 33 13
Or maybe I'm not specifying arrays/collections correctly, but adding [] is the most obvious way so it would make sense to support it if it's not supported.

@grishka
Copy link
Author

grishka commented Jul 10, 2021

Trying to output a property of an array element produces an even weirder error:
Снимок экрана 2021-07-10 в 13 45 30

@bjansen bjansen added the t-bug label Aug 23, 2021
@bjansen
Copy link
Owner

bjansen commented Mar 1, 2024

FTR subtypes of java.lang.Iterable and scala.collection.Iterable are already supported:
image

I'll throw in support for arrays too.

bjansen added a commit that referenced this issue Mar 9, 2024
@bjansen bjansen closed this as completed Mar 9, 2024
@bjansen bjansen added this to the 0.11 milestone Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants