Skip to content

Inlining with nested classes #14410

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

Closed
odersky opened this issue Feb 3, 2022 · 1 comment
Closed

Inlining with nested classes #14410

odersky opened this issue Feb 3, 2022 · 1 comment
Labels
area:inline Semester Project Good project to be done by an MSc or strong Bsc computer science student in one semester

Comments

@odersky
Copy link
Contributor

odersky commented Feb 3, 2022

Inlining currently does not work very well if the inline method contains local classes. It works in simple cases but fails in many more complicated ones. Things to try: sealed class hierarchies, enums, generic classes.

It would be good to scan the issues for more concrete examples of what currently fails.

But in any case, what we would need is a systematic approach to copying classes and class hierarchies in inline methods. The tricky bit here is that we have to duplicate a bunch of symbols when inlining and we need to also update all possible references between such symbols.

@odersky odersky added area:inline Semester Project Good project to be done by an MSc or strong Bsc computer science student in one semester labels Feb 3, 2022
@odersky
Copy link
Contributor Author

odersky commented Feb 22, 2022

Most problems should be addressed by #14537

@odersky odersky closed this as completed Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:inline Semester Project Good project to be done by an MSc or strong Bsc computer science student in one semester
Projects
None yet
Development

No branches or pull requests

1 participant