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

Generics in Kotlin codegen #88

Open
nikitavlaev opened this issue May 31, 2022 · 0 comments
Open

Generics in Kotlin codegen #88

nikitavlaev opened this issue May 31, 2022 · 0 comments
Assignees
Labels
comp-codegen Issue is related to code generator ctg-enhancement New feature, improvement or change request lang-kotlin Issue is related to Kotlin language support

Comments

@nikitavlaev
Copy link
Member

Description

Extract type variables from the available structures inside the engine and put them into the result model.

Expected behavior

Kotlin code should be generated with generics where it is required.
Framework tests should pass with compilation for Kotlin enabled.
Additional testing on contest estimator is to be done.

Environment

Not applicable

Potential alternatives

Not applicable

Context

Generic types are much more often required in Kotlin than in Java(e.g. collections), so additional support for them is to be made.
Currently, generated Kotlin code does not use generics, and thus a lot of code does not compile.

@nikitavlaev nikitavlaev self-assigned this May 31, 2022
@nikitavlaev nikitavlaev added ctg-enhancement New feature, improvement or change request comp-codegen Issue is related to code generator labels May 31, 2022
@alexeyfridman alexeyfridman moved this to Todo in UTBot Java May 31, 2022
nikitavlaev added a commit that referenced this issue Aug 12, 2022
Refactored imports to support kotlin builtins (List, Map, e.t.c).
Added generics propagation using callables.
Added filling generics with Any? and *.
Reworked Kotlin type render.
Fixed assemble model generation in concrete.
Fixed bug with backticks.
nikitavlaev added a commit that referenced this issue Aug 14, 2022
Refactored imports to support kotlin builtins (List, Map, e.t.c).
Added generics propagation using callables.
Added filling generics with Any? and *.
Reworked Kotlin type render.
Fixed assemble model generation in concrete.
Fixed bug with backticks.
nikitavlaev added a commit that referenced this issue Aug 15, 2022
Refactored imports to support kotlin builtins (List, Map, e.t.c).
Added generics propagation using callables.
Added filling generics with Any? and *.
Reworked Kotlin type render.
Fixed assemble model generation in concrete.
Fixed bug with backticks.
nikitavlaev added a commit that referenced this issue Aug 15, 2022
Refactored imports to support kotlin builtins (List, Map, e.t.c).
Added generics propagation using callables.
Added filling generics with Any? and *.
Reworked Kotlin type render.
Fixed assemble model generation in concrete.
Fixed bug with backticks.
nikitavlaev added a commit that referenced this issue Aug 16, 2022
Refactored imports to support kotlin builtins (List, Map, e.t.c).
Added generics propagation using callables.
Added filling generics with Any? and *.
Reworked Kotlin type render.
Fixed assemble model generation in concrete.
Fixed bug with backticks.
nikitavlaev added a commit that referenced this issue Aug 16, 2022
Refactored imports to support kotlin builtins (List, Map, e.t.c).
Added generics propagation using callables.
Added filling generics with Any? and *.
Reworked Kotlin type render.
Fixed assemble model generation in concrete.
Fixed bug with backticks.
nikitavlaev added a commit that referenced this issue Aug 17, 2022
Refactored imports to support kotlin builtins (List, Map, e.t.c).
Added generics propagation using callables.
Added filling generics with Any? and *.
Reworked Kotlin type render.
Fixed assemble model generation in concrete.
Fixed bug with backticks.
nikitavlaev added a commit that referenced this issue Sep 4, 2022
Refactored imports to support kotlin builtins (List, Map, e.t.c).
Added generics propagation using callables.
Added filling generics with Any? and *.
Reworked Kotlin type render.
Fixed assemble model generation in concrete.
Fixed bug with backticks.
@tyuldashev tyuldashev added the lang-kotlin Issue is related to Kotlin language support label Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-codegen Issue is related to code generator ctg-enhancement New feature, improvement or change request lang-kotlin Issue is related to Kotlin language support
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

2 participants