diff --git a/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/synthetic/KSTypeReferenceSyntheticImpl.kt b/common-util/src/main/kotlin/com/google/devtools/ksp/processing/impl/KSTypeReferenceSyntheticImpl.kt similarity index 96% rename from compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/synthetic/KSTypeReferenceSyntheticImpl.kt rename to common-util/src/main/kotlin/com/google/devtools/ksp/processing/impl/KSTypeReferenceSyntheticImpl.kt index aa2631e4a1..13da8ff85a 100644 --- a/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/synthetic/KSTypeReferenceSyntheticImpl.kt +++ b/common-util/src/main/kotlin/com/google/devtools/ksp/processing/impl/KSTypeReferenceSyntheticImpl.kt @@ -1,4 +1,4 @@ -package com.google.devtools.ksp.symbol.impl.synthetic +package com.google.devtools.ksp.processing.impl import com.google.devtools.ksp.IdKey import com.google.devtools.ksp.KSObjectCache diff --git a/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/binary/KSAnnotationDescriptorImpl.kt b/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/binary/KSAnnotationDescriptorImpl.kt index fc5f88e91c..1aff270135 100644 --- a/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/binary/KSAnnotationDescriptorImpl.kt +++ b/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/binary/KSAnnotationDescriptorImpl.kt @@ -21,6 +21,7 @@ import com.google.devtools.ksp.ExceptionMessage import com.google.devtools.ksp.KSObjectCache import com.google.devtools.ksp.getClassDeclarationByName import com.google.devtools.ksp.processing.impl.KSNameImpl +import com.google.devtools.ksp.processing.impl.KSTypeReferenceSyntheticImpl import com.google.devtools.ksp.processing.impl.ResolverImpl import com.google.devtools.ksp.symbol.* import com.google.devtools.ksp.symbol.impl.findPsi @@ -28,7 +29,6 @@ import com.google.devtools.ksp.symbol.impl.java.KSAnnotationJavaImpl import com.google.devtools.ksp.symbol.impl.kotlin.KSErrorType import com.google.devtools.ksp.symbol.impl.kotlin.KSValueArgumentLiteImpl import com.google.devtools.ksp.symbol.impl.kotlin.getKSTypeCached -import com.google.devtools.ksp.symbol.impl.synthetic.KSTypeReferenceSyntheticImpl import com.intellij.psi.JavaPsiFacade import com.intellij.psi.PsiAnnotation import com.intellij.psi.PsiAnnotationMethod diff --git a/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/kotlin/KSClassDeclarationImpl.kt b/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/kotlin/KSClassDeclarationImpl.kt index 89bb2b4f08..d4c1fb02ab 100644 --- a/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/kotlin/KSClassDeclarationImpl.kt +++ b/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/kotlin/KSClassDeclarationImpl.kt @@ -21,6 +21,7 @@ import com.google.devtools.ksp.KSObjectCache import com.google.devtools.ksp.getClassType import com.google.devtools.ksp.isConstructor import com.google.devtools.ksp.memoized +import com.google.devtools.ksp.processing.impl.KSTypeReferenceSyntheticImpl import com.google.devtools.ksp.processing.impl.ResolverImpl import com.google.devtools.ksp.symbol.* import com.google.devtools.ksp.symbol.impl.* @@ -28,7 +29,6 @@ import com.google.devtools.ksp.symbol.impl.binary.getAllFunctions import com.google.devtools.ksp.symbol.impl.binary.getAllProperties import com.google.devtools.ksp.symbol.impl.binary.sealedSubclassesSequence import com.google.devtools.ksp.symbol.impl.synthetic.KSConstructorSyntheticImpl -import com.google.devtools.ksp.symbol.impl.synthetic.KSTypeReferenceSyntheticImpl import org.jetbrains.kotlin.descriptors.ClassDescriptor import org.jetbrains.kotlin.psi.KtClassOrObject import org.jetbrains.kotlin.psi.KtObjectDeclaration diff --git a/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/kotlin/KSTypeParameterImpl.kt b/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/kotlin/KSTypeParameterImpl.kt index 340833a4a7..4e63b673de 100644 --- a/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/kotlin/KSTypeParameterImpl.kt +++ b/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/kotlin/KSTypeParameterImpl.kt @@ -20,6 +20,7 @@ package com.google.devtools.ksp.symbol.impl.kotlin import com.google.devtools.ksp.KSObjectCache import com.google.devtools.ksp.memoized import com.google.devtools.ksp.processing.impl.KSNameImpl +import com.google.devtools.ksp.processing.impl.KSTypeReferenceSyntheticImpl import com.google.devtools.ksp.processing.impl.ResolverImpl import com.google.devtools.ksp.symbol.KSExpectActual import com.google.devtools.ksp.symbol.KSName @@ -27,7 +28,6 @@ import com.google.devtools.ksp.symbol.KSTypeParameter import com.google.devtools.ksp.symbol.KSTypeReference import com.google.devtools.ksp.symbol.KSVisitor import com.google.devtools.ksp.symbol.Variance -import com.google.devtools.ksp.symbol.impl.synthetic.KSTypeReferenceSyntheticImpl import org.jetbrains.kotlin.lexer.KtTokens import org.jetbrains.kotlin.psi.KtTypeParameter import org.jetbrains.kotlin.psi.KtTypeParameterListOwner diff --git a/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/kotlin/KSValueParameterImpl.kt b/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/kotlin/KSValueParameterImpl.kt index 162d77fa3b..6ce3995df9 100644 --- a/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/kotlin/KSValueParameterImpl.kt +++ b/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/kotlin/KSValueParameterImpl.kt @@ -20,6 +20,7 @@ package com.google.devtools.ksp.symbol.impl.kotlin import com.google.devtools.ksp.KSObjectCache import com.google.devtools.ksp.memoized import com.google.devtools.ksp.processing.impl.KSNameImpl +import com.google.devtools.ksp.processing.impl.KSTypeReferenceSyntheticImpl import com.google.devtools.ksp.processing.impl.findAnnotationFromUseSiteTarget import com.google.devtools.ksp.symbol.KSAnnotation import com.google.devtools.ksp.symbol.KSName @@ -31,7 +32,6 @@ import com.google.devtools.ksp.symbol.KSValueParameter import com.google.devtools.ksp.symbol.KSVisitor import com.google.devtools.ksp.symbol.Location import com.google.devtools.ksp.symbol.Origin -import com.google.devtools.ksp.symbol.impl.synthetic.KSTypeReferenceSyntheticImpl import com.google.devtools.ksp.symbol.impl.toLocation import org.jetbrains.kotlin.descriptors.annotations.AnnotationUseSiteTarget import org.jetbrains.kotlin.lexer.KtTokens.CROSSINLINE_KEYWORD diff --git a/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/synthetic/KSConstructorSyntheticImpl.kt b/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/synthetic/KSConstructorSyntheticImpl.kt index 19108d99c7..8f2efd36f7 100644 --- a/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/synthetic/KSConstructorSyntheticImpl.kt +++ b/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/synthetic/KSConstructorSyntheticImpl.kt @@ -20,6 +20,7 @@ package com.google.devtools.ksp.symbol.impl.synthetic import com.google.devtools.ksp.KSObjectCache import com.google.devtools.ksp.isPublic import com.google.devtools.ksp.processing.impl.KSNameImpl +import com.google.devtools.ksp.processing.impl.KSTypeReferenceSyntheticImpl import com.google.devtools.ksp.processing.impl.ResolverImpl import com.google.devtools.ksp.symbol.* diff --git a/kotlin-analysis-api/src/main/kotlin/com/google/devtools/ksp/impl/ResolverAAImpl.kt b/kotlin-analysis-api/src/main/kotlin/com/google/devtools/ksp/impl/ResolverAAImpl.kt index 328f2406f0..7f44fb416a 100644 --- a/kotlin-analysis-api/src/main/kotlin/com/google/devtools/ksp/impl/ResolverAAImpl.kt +++ b/kotlin-analysis-api/src/main/kotlin/com/google/devtools/ksp/impl/ResolverAAImpl.kt @@ -34,6 +34,7 @@ import com.google.devtools.ksp.impl.symbol.kotlin.toKtClassSymbol import com.google.devtools.ksp.processing.KSBuiltIns import com.google.devtools.ksp.processing.Resolver import com.google.devtools.ksp.processing.impl.KSNameImpl +import com.google.devtools.ksp.processing.impl.KSTypeReferenceSyntheticImpl import com.google.devtools.ksp.symbol.KSAnnotated import com.google.devtools.ksp.symbol.KSClassDeclaration import com.google.devtools.ksp.symbol.KSDeclaration @@ -125,7 +126,7 @@ class ResolverAAImpl( } override fun createKSTypeReferenceFromKSType(type: KSType): KSTypeReference { - TODO("Not yet implemented") + return KSTypeReferenceSyntheticImpl.getCached(type, null) } override fun effectiveJavaModifiers(declaration: KSDeclaration): Set {