-
Notifications
You must be signed in to change notification settings - Fork 280
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
use psi based type reference to defer type resolution #1506
Conversation
...sis-api/src/main/kotlin/com/google/devtools/ksp/impl/symbol/kotlin/KSClassDeclarationImpl.kt
Outdated
Show resolved
Hide resolved
@@ -15,18 +17,18 @@ class KSCallableReferenceImpl private constructor( | |||
cache.getOrPut(IdKeyPair(ktFunctionalType, parent)) { KSCallableReferenceImpl(ktFunctionalType, parent) } | |||
} | |||
override val receiverType: KSTypeReference? | |||
get() = ktFunctionalType.receiverType?.let { KSTypeReferenceImpl.getCached(it) } | |||
get() = ktFunctionalType.receiverType?.let { KSTypeReferenceResolvedImpl.getCached(it) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the purpose of deferring and restoring, all type references in sources (be it java or kotlin) need to be implemented by KSTypeReferenceImpl
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, KSCallableReferenceImpl
can not take KtFunctionalType
for sources, because it is subject to change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
KtCallableReference is left as TODO in this PR.
.../src/main/kotlin/com/google/devtools/ksp/impl/symbol/kotlin/KSPropertyDeclarationJavaImpl.kt
Show resolved
Hide resolved
7ed007e
to
9717019
Compare
758d9a2
to
9f63e90
Compare
9f63e90
to
3c1efde
Compare
|
3c1efde
to
42b7643
Compare
No description provided.