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

Is it possible to resolve types from other files using Kotlin Compiler APIs? #3

Open
kiranpuppala opened this issue Jan 31, 2023 · 0 comments

Comments

@kiranpuppala
Copy link

By just using Kotlin Compiler APIs to parse the AST, we can only resolve AST for one particular file. But is it possible to resolve types from other files?

To resolve types and other class information of the class that is in some other file, we would need bindingContext. I assume when we are developing a compiler plugin we would get the binding context. But if we are solely relying on Kotlin compiler APIs and parsing on one file at a time, is it possible to resolve the types of classes in other files?

Relevant questions:
https://discuss.kotlinlang.org/t/how-to-get-declaring-ktfile-ktclass-using-ktcallexpression/26271/1
https://stackoverflow.com/questions/44986763/psitreevisitor-how-to-find-out-type-of-ktcallexpression-receiver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant