Skip to content

Generify accept methods in AST#4197

Merged
enebo merged 2 commits intojruby:masterfrom
jsyeo:jsyeo-generics
Sep 19, 2018
Merged

Generify accept methods in AST#4197
enebo merged 2 commits intojruby:masterfrom
jsyeo:jsyeo-generics

Conversation

@jsyeo
Copy link
Contributor

@jsyeo jsyeo commented Oct 1, 2016

Some of the AST's accept methods were returning Object instead of the generic type.

@enebo
Copy link
Member

enebo commented Oct 12, 2016

@jsyeo If I have compiled with the previous visitor API will this still run with this generic version once compiled? Since JVM does type erasure I think it will but I am not positive. Do you know? I consider AST an internal API more or less for jruby proper but I still like to avoid compat errors if possible.

@headius
Copy link
Member

headius commented Oct 14, 2016

I believe it still looks identical (returning Object) if it claims to return T.

@jsyeo
Copy link
Contributor Author

jsyeo commented Oct 31, 2016

If I have compiled with the previous visitor API will this still run with this generic version once compiled?

Yes. I have tested it.

@enebo enebo merged commit a611165 into jruby:master Sep 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants