[AA] Fix typos in renderers
This commit is contained in:
committed by
Space Team
parent
25ad7fe31c
commit
2851622a6f
+6
-6
@@ -218,15 +218,15 @@ public class Fe10IdeNormalAnalysisSourceModuleRendererTestGenerated extends Abst
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("annotaionOnTypes.kt")
|
||||
public void testAnnotaionOnTypes() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/annotaionOnTypes.kt");
|
||||
@TestMetadata("annotationOnTypes.kt")
|
||||
public void testAnnotationOnTypes() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/annotationOnTypes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("annotaionOnTypesWithComplexExpression.kt")
|
||||
public void testAnnotaionOnTypesWithComplexExpression() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/annotaionOnTypesWithComplexExpression.kt");
|
||||
@TestMetadata("annotationOnTypesWithComplexExpression.kt")
|
||||
public void testAnnotationOnTypesWithComplexExpression() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/annotationOnTypesWithComplexExpression.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -218,15 +218,15 @@ public class FirIdeDependentAnalysisSourceModuleRendererTestGenerated extends Ab
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("annotaionOnTypes.kt")
|
||||
public void testAnnotaionOnTypes() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/annotaionOnTypes.kt");
|
||||
@TestMetadata("annotationOnTypes.kt")
|
||||
public void testAnnotationOnTypes() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/annotationOnTypes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("annotaionOnTypesWithComplexExpression.kt")
|
||||
public void testAnnotaionOnTypesWithComplexExpression() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/annotaionOnTypesWithComplexExpression.kt");
|
||||
@TestMetadata("annotationOnTypesWithComplexExpression.kt")
|
||||
public void testAnnotationOnTypesWithComplexExpression() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/annotationOnTypesWithComplexExpression.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -218,15 +218,15 @@ public class FirIdeNormalAnalysisSourceModuleRendererTestGenerated extends Abstr
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("annotaionOnTypes.kt")
|
||||
public void testAnnotaionOnTypes() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/annotaionOnTypes.kt");
|
||||
@TestMetadata("annotationOnTypes.kt")
|
||||
public void testAnnotationOnTypes() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/annotationOnTypes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("annotaionOnTypesWithComplexExpression.kt")
|
||||
public void testAnnotaionOnTypesWithComplexExpression() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/annotaionOnTypesWithComplexExpression.kt");
|
||||
@TestMetadata("annotationOnTypesWithComplexExpression.kt")
|
||||
public void testAnnotationOnTypesWithComplexExpression() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/annotationOnTypesWithComplexExpression.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -218,15 +218,15 @@ public class FirStandaloneNormalAnalysisSourceModuleRendererTestGenerated extend
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("annotaionOnTypes.kt")
|
||||
public void testAnnotaionOnTypes() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/annotaionOnTypes.kt");
|
||||
@TestMetadata("annotationOnTypes.kt")
|
||||
public void testAnnotationOnTypes() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/annotationOnTypes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("annotaionOnTypesWithComplexExpression.kt")
|
||||
public void testAnnotaionOnTypesWithComplexExpression() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/annotaionOnTypesWithComplexExpression.kt");
|
||||
@TestMetadata("annotationOnTypesWithComplexExpression.kt")
|
||||
public void testAnnotationOnTypesWithComplexExpression() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/annotationOnTypesWithComplexExpression.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -26,7 +26,7 @@ import org.jetbrains.kotlin.analysis.utils.printer.PrettyPrinter
|
||||
|
||||
public class KtDeclarationRenderer private constructor(
|
||||
public val nameRenderer: KtDeclarationNameRenderer,
|
||||
public val keywordRender: KtKeywordRenderer,
|
||||
public val keywordRenderer: KtKeywordRenderer,
|
||||
public val codeStyle: KtRendererCodeStyle,
|
||||
public val typeRenderer: KtTypeRenderer,
|
||||
public val annotationRenderer: KtAnnotationRenderer,
|
||||
@@ -55,7 +55,7 @@ public class KtDeclarationRenderer private constructor(
|
||||
public val typeParametersRenderer: KtTypeParametersRenderer,
|
||||
public val typeParametersFilter: KtTypeParameterRendererFilter,
|
||||
|
||||
public val callableSignatureRenderer: KtCallableSignatureRender,
|
||||
public val callableSignatureRenderer: KtCallableSignatureRenderer,
|
||||
|
||||
public val anonymousFunctionRenderer: KtAnonymousFunctionSymbolRenderer,
|
||||
public val backingFieldRenderer: KtBackingFieldSymbolRenderer,
|
||||
@@ -109,7 +109,7 @@ public class KtDeclarationRenderer private constructor(
|
||||
val renderer = this
|
||||
return KtDeclarationRenderer {
|
||||
this.nameRenderer = renderer.nameRenderer
|
||||
this.keywordRender = renderer.keywordRender
|
||||
this.keywordRender = renderer.keywordRenderer
|
||||
this.codeStyle = renderer.codeStyle
|
||||
this.typeRenderer = renderer.typeRenderer
|
||||
this.annotationRenderer = renderer.annotationRenderer
|
||||
@@ -201,7 +201,7 @@ public class KtDeclarationRenderer private constructor(
|
||||
public lateinit var valueParametersRenderer: KtCallableParameterRenderer
|
||||
public lateinit var typeParametersRenderer: KtTypeParametersRenderer
|
||||
public lateinit var typeParametersFilter: KtTypeParameterRendererFilter
|
||||
public lateinit var callableSignatureRenderer: KtCallableSignatureRender
|
||||
public lateinit var callableSignatureRenderer: KtCallableSignatureRenderer
|
||||
|
||||
public lateinit var anonymousFunctionRenderer: KtAnonymousFunctionSymbolRenderer
|
||||
public lateinit var backingFieldRenderer: KtBackingFieldSymbolRenderer
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ public object KtDeclarationRendererForSource {
|
||||
valueParameterRenderer = KtValueParameterSymbolRenderer.AS_SOURCE
|
||||
samConstructorRenderer = KtSamConstructorSymbolRenderer.NOT_RENDER
|
||||
|
||||
callableSignatureRenderer = KtCallableSignatureRender.FOR_SOURCE
|
||||
callableSignatureRenderer = KtCallableSignatureRenderer.FOR_SOURCE
|
||||
accessorBodyRenderer = KtPropertyAccessorBodyRenderer.NO_BODY
|
||||
parameterDefaultValueRenderer = KtParameterDefaultValueRenderer.NO_DEFAULT_VALUE
|
||||
variableInitializerRenderer = KtVariableInitializerRenderer.NO_INITIALIZER
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ public fun <S> renderAnnotationsAndModifiers(
|
||||
}
|
||||
|
||||
withPrefix(separator) {
|
||||
keywordRender.renderKeywords(keywords, symbol, printer)
|
||||
keywordRenderer.renderKeywords(keywords, symbol, printer)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ public interface KtClassInitializerRenderer {
|
||||
context(KtAnalysisSession, KtDeclarationRenderer)
|
||||
override fun renderClassInitializer(symbol: KtClassInitializerSymbol, printer: PrettyPrinter): Unit = printer {
|
||||
" ".separated(
|
||||
{ keywordRender.renderKeyword(KtTokens.INIT_KEYWORD, symbol, this) },
|
||||
{ keywordRenderer.renderKeyword(KtTokens.INIT_KEYWORD, symbol, this) },
|
||||
{ printer.withIndentInBraces {} },
|
||||
)
|
||||
}
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ public interface KtTypeParametersRenderer {
|
||||
}
|
||||
}.ifEmpty { return }
|
||||
" ".separated(
|
||||
{ keywordRender.renderKeyword(KtTokens.WHERE_KEYWORD, symbol, printer) },
|
||||
{ keywordRenderer.renderKeyword(KtTokens.WHERE_KEYWORD, symbol, printer) },
|
||||
{
|
||||
printer.printCollection(allBounds) { (typeParameter, bound) ->
|
||||
" : ".separated(
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ public interface KtBackingFieldSymbolRenderer {
|
||||
public object AS_FIELD_KEYWROD : KtBackingFieldSymbolRenderer {
|
||||
context(KtAnalysisSession, KtDeclarationRenderer)
|
||||
override fun renderSymbol(symbol: KtBackingFieldSymbol, printer: PrettyPrinter): Unit = printer {
|
||||
keywordRender.renderKeyword(KtTokens.FIELD_KEYWORD, symbol, printer)
|
||||
keywordRenderer.renderKeyword(KtTokens.FIELD_KEYWORD, symbol, printer)
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -13,11 +13,11 @@ import org.jetbrains.kotlin.analysis.api.symbols.markers.KtNamedSymbol
|
||||
import org.jetbrains.kotlin.analysis.utils.printer.PrettyPrinter
|
||||
import org.jetbrains.kotlin.lexer.KtKeywordToken
|
||||
|
||||
public interface KtCallableSignatureRender {
|
||||
public interface KtCallableSignatureRenderer {
|
||||
context(KtAnalysisSession, KtDeclarationRenderer)
|
||||
public fun renderCallableSignature(symbol: KtCallableSymbol, keyword: KtKeywordToken?, printer: PrettyPrinter)
|
||||
|
||||
public object FOR_SOURCE : KtCallableSignatureRender {
|
||||
public object FOR_SOURCE : KtCallableSignatureRenderer {
|
||||
context(KtAnalysisSession, KtDeclarationRenderer)
|
||||
override fun renderCallableSignature(symbol: KtCallableSymbol, keyword: KtKeywordToken?, printer: PrettyPrinter): Unit = printer {
|
||||
" ".separated(
|
||||
+1
-1
@@ -44,7 +44,7 @@ public interface KtNamedClassOrObjectSymbolRenderer {
|
||||
val annotationsPrinted = checkIfPrinted { renderAnnotationsAndModifiers(primaryConstructor, printer) }
|
||||
if (annotationsPrinted) {
|
||||
withPrefix(" ") {
|
||||
keywordRender.renderKeyword(KtTokens.CONSTRUCTOR_KEYWORD, primaryConstructor, printer)
|
||||
keywordRenderer.renderKeyword(KtTokens.CONSTRUCTOR_KEYWORD, primaryConstructor, printer)
|
||||
}
|
||||
}
|
||||
if (primaryConstructor.valueParameters.isNotEmpty()) {
|
||||
|
||||
+5
-6
@@ -9,7 +9,7 @@ import org.jetbrains.kotlin.analysis.api.KtAnalysisSession
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.base.KtKeywordRenderer
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.base.annotations.KtAnnotationRenderer
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.declarations.KtRendererTypeApproximator
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.renders.*
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.renderers.*
|
||||
import org.jetbrains.kotlin.analysis.api.types.*
|
||||
import org.jetbrains.kotlin.analysis.utils.printer.PrettyPrinter
|
||||
|
||||
@@ -30,7 +30,7 @@ public class KtTypeRenderer private constructor(
|
||||
public val typeNameRenderer: KtTypeNameRenderer,
|
||||
public val typeApproximator: KtRendererTypeApproximator,
|
||||
public val typeProjectionRenderer: KtTypeProjectionRenderer,
|
||||
public val annotationsRender: KtAnnotationRenderer,
|
||||
public val annotationsRenderer: KtAnnotationRenderer,
|
||||
public val keywordRenderer: KtKeywordRenderer,
|
||||
) {
|
||||
context(KtAnalysisSession)
|
||||
@@ -68,7 +68,7 @@ public class KtTypeRenderer private constructor(
|
||||
this.typeNameRenderer = renderer.typeNameRenderer
|
||||
this.typeApproximator = renderer.typeApproximator
|
||||
this.typeProjectionRenderer = renderer.typeProjectionRenderer
|
||||
this.annotationsRender = renderer.annotationsRender
|
||||
this.annotationsRenderer = renderer.annotationsRenderer
|
||||
this.keywordRenderer = renderer.keywordRenderer
|
||||
action()
|
||||
}
|
||||
@@ -95,10 +95,9 @@ public class KtTypeRenderer private constructor(
|
||||
public lateinit var typeNameRenderer: KtTypeNameRenderer
|
||||
public lateinit var typeApproximator: KtRendererTypeApproximator
|
||||
public lateinit var typeProjectionRenderer: KtTypeProjectionRenderer
|
||||
public lateinit var annotationsRender: KtAnnotationRenderer
|
||||
public lateinit var annotationsRenderer: KtAnnotationRenderer
|
||||
public lateinit var keywordRenderer: KtKeywordRenderer
|
||||
|
||||
|
||||
public fun build(): KtTypeRenderer = KtTypeRenderer(
|
||||
capturedTypeRenderer,
|
||||
definitelyNotNullTypeRenderer,
|
||||
@@ -115,7 +114,7 @@ public class KtTypeRenderer private constructor(
|
||||
typeNameRenderer,
|
||||
typeApproximator,
|
||||
typeProjectionRenderer,
|
||||
annotationsRender,
|
||||
annotationsRenderer,
|
||||
keywordRenderer,
|
||||
)
|
||||
}
|
||||
|
||||
+4
-4
@@ -6,10 +6,10 @@
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.impl
|
||||
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.KtTypeRenderer
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.renders.KtCapturedTypeRenderer
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.renders.KtFlexibleTypeRenderer
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.renders.KtTypeErrorTypeRenderer
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.renders.KtUnresolvedClassErrorTypeRenderer
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.renderers.KtCapturedTypeRenderer
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.renderers.KtFlexibleTypeRenderer
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.renderers.KtTypeErrorTypeRenderer
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.renderers.KtUnresolvedClassErrorTypeRenderer
|
||||
|
||||
public object KtTypeRendererForDebug {
|
||||
public val WITH_QUALIFIED_NAMES: KtTypeRenderer = KtTypeRendererForSource.WITH_QUALIFIED_NAMES.with {
|
||||
|
||||
+3
-3
@@ -9,7 +9,7 @@ import org.jetbrains.kotlin.analysis.api.renderer.base.KtKeywordRenderer
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.base.annotations.KtAnnotationRendererForSource
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.declarations.KtRendererTypeApproximator
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.KtTypeRenderer
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.renders.*
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.renderers.*
|
||||
|
||||
public object KtTypeRendererForSource {
|
||||
public val WITH_QUALIFIED_NAMES: KtTypeRenderer = KtTypeRenderer {
|
||||
@@ -28,12 +28,12 @@ public object KtTypeRendererForSource {
|
||||
typeNameRenderer = KtTypeNameRenderer.QUOTED
|
||||
typeApproximator = KtRendererTypeApproximator.TO_DENNOTABLE
|
||||
typeProjectionRenderer = KtTypeProjectionRenderer.WITH_VARIANCE
|
||||
annotationsRender = KtAnnotationRendererForSource.WITH_QUALIFIED_NAMES
|
||||
annotationsRenderer = KtAnnotationRendererForSource.WITH_QUALIFIED_NAMES
|
||||
keywordRenderer = KtKeywordRenderer.AS_WORD
|
||||
}
|
||||
|
||||
public val WITH_SHORT_NAMES: KtTypeRenderer = WITH_QUALIFIED_NAMES.with {
|
||||
classIdRenderer = KtClassTypeQualifierRenderer.WITH_SHORT_NAMES_WITH_NESTED_CLASSIFIERS
|
||||
annotationsRender = KtAnnotationRendererForSource.WITH_SHORT_NAMES
|
||||
annotationsRenderer = KtAnnotationRendererForSource.WITH_SHORT_NAMES
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renders
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renderers
|
||||
|
||||
import org.jetbrains.kotlin.analysis.api.KtAnalysisSession
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.KtTypeRenderer
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renders
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renderers
|
||||
|
||||
import org.jetbrains.kotlin.analysis.api.KtAnalysisSession
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.KtTypeRenderer
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renders
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renderers
|
||||
|
||||
import org.jetbrains.kotlin.analysis.api.KtAnalysisSession
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.KtTypeRenderer
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renders
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renderers
|
||||
|
||||
import org.jetbrains.kotlin.analysis.api.KtAnalysisSession
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.KtTypeRenderer
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renders
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renderers
|
||||
|
||||
import org.jetbrains.kotlin.analysis.api.KtAnalysisSession
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.KtTypeRenderer
|
||||
@@ -43,7 +43,7 @@ public interface KtFlexibleTypeRenderer {
|
||||
|
||||
isMutabilityFlexibleType(lower, upper) -> {
|
||||
" ".separated(
|
||||
{ annotationsRender.renderAnnotations(type, printer) },
|
||||
{ annotationsRenderer.renderAnnotations(type, printer) },
|
||||
{ append(lower.classId.asFqNameString().replace("Mutable", "(Mutable)")) },
|
||||
)
|
||||
printCollectionIfNotEmpty(lower.ownTypeArguments, prefix = "<", postfix = ">") { typeArgument ->
|
||||
+6
-6
@@ -3,7 +3,7 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renders
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renderers
|
||||
|
||||
import org.jetbrains.kotlin.analysis.api.KtAnalysisSession
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.KtTypeRenderer
|
||||
@@ -20,9 +20,9 @@ public interface KtFunctionalTypeRenderer {
|
||||
public object AS_FUNCTIONAL_TYPE : KtFunctionalTypeRenderer {
|
||||
context(KtAnalysisSession, KtTypeRenderer)
|
||||
override fun renderType(type: KtFunctionalType, printer: PrettyPrinter): Unit = printer {
|
||||
val annotationsRendererd = checkIfPrinted { annotationsRender.renderAnnotations(type, this) }
|
||||
if (annotationsRendererd) printer.append(" ")
|
||||
if (annotationsRendererd || type.nullability == KtTypeNullability.NULLABLE) append("(")
|
||||
val annotationsRendered = checkIfPrinted { annotationsRenderer.renderAnnotations(type, this) }
|
||||
if (annotationsRendered) printer.append(" ")
|
||||
if (annotationsRendered || type.nullability == KtTypeNullability.NULLABLE) append("(")
|
||||
" ".separated(
|
||||
{
|
||||
if (type.isSuspend) {
|
||||
@@ -38,7 +38,7 @@ public interface KtFunctionalTypeRenderer {
|
||||
renderType(type.returnType, printer)
|
||||
},
|
||||
)
|
||||
if (annotationsRendererd || type.nullability == KtTypeNullability.NULLABLE) append(")")
|
||||
if (annotationsRendered || type.nullability == KtTypeNullability.NULLABLE) append(")")
|
||||
if (type.nullability == KtTypeNullability.NULLABLE) append("?")
|
||||
}
|
||||
}
|
||||
@@ -47,7 +47,7 @@ public interface KtFunctionalTypeRenderer {
|
||||
context(KtAnalysisSession, KtTypeRenderer)
|
||||
override fun renderType(type: KtFunctionalType, printer: PrettyPrinter): Unit = printer {
|
||||
" ".separated(
|
||||
{ annotationsRender.renderAnnotations(type, printer) },
|
||||
{ annotationsRenderer.renderAnnotations(type, printer) },
|
||||
{
|
||||
classIdRenderer.renderClassTypeQualifier(type, printer)
|
||||
if (type.nullability == KtTypeNullability.NULLABLE) {
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renders
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renderers
|
||||
|
||||
import org.jetbrains.kotlin.analysis.api.KtAnalysisSession
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.KtTypeRenderer
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renders
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renderers
|
||||
|
||||
import org.jetbrains.kotlin.analysis.api.KtAnalysisSession
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.KtTypeRenderer
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renders
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renderers
|
||||
|
||||
import org.jetbrains.kotlin.analysis.api.KtAnalysisSession
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.KtTypeRenderer
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renders
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renderers
|
||||
|
||||
import org.jetbrains.kotlin.analysis.api.KtAnalysisSession
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.KtTypeRenderer
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renders
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renderers
|
||||
|
||||
import org.jetbrains.kotlin.analysis.api.KtAnalysisSession
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.KtTypeRenderer
|
||||
@@ -20,7 +20,7 @@ public interface KtTypeParameterTypeRenderer {
|
||||
context(KtAnalysisSession, KtTypeRenderer)
|
||||
override fun renderType(type: KtTypeParameterType, printer: PrettyPrinter): Unit = printer {
|
||||
" ".separated(
|
||||
{ annotationsRender.renderAnnotations(type, printer) },
|
||||
{ annotationsRenderer.renderAnnotations(type, printer) },
|
||||
{
|
||||
typeNameRenderer.renderName(type.name, type, printer)
|
||||
if (type.nullability == KtTypeNullability.NULLABLE) {
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renders
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renderers
|
||||
|
||||
import org.jetbrains.kotlin.analysis.api.KtAnalysisSession
|
||||
import org.jetbrains.kotlin.analysis.api.KtStarTypeProjection
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renders
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renderers
|
||||
|
||||
import org.jetbrains.kotlin.analysis.api.KtAnalysisSession
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.KtTypeRenderer
|
||||
@@ -17,7 +17,7 @@ public interface KtUnresolvedClassErrorTypeRenderer {
|
||||
public object UNRESOLVED_QUALIFIER : KtUnresolvedClassErrorTypeRenderer {
|
||||
context(KtAnalysisSession, KtTypeRenderer)
|
||||
override fun renderType(type: KtClassErrorType, printer: PrettyPrinter): Unit = printer {
|
||||
annotationsRender.renderAnnotations(type, printer)
|
||||
annotationsRenderer.renderAnnotations(type, printer)
|
||||
classIdRenderer.renderClassTypeQualifier(type, printer)
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renders
|
||||
package org.jetbrains.kotlin.analysis.api.renderer.types.renderers
|
||||
|
||||
import org.jetbrains.kotlin.analysis.api.KtAnalysisSession
|
||||
import org.jetbrains.kotlin.analysis.api.renderer.types.KtTypeRenderer
|
||||
@@ -20,7 +20,7 @@ public interface KtUsualClassTypeRenderer {
|
||||
context(KtAnalysisSession, KtTypeRenderer)
|
||||
override fun renderType(type: KtUsualClassType, printer: PrettyPrinter): Unit = printer {
|
||||
" ".separated(
|
||||
{ annotationsRender.renderAnnotations(type, printer) },
|
||||
{ annotationsRenderer.renderAnnotations(type, printer) },
|
||||
{
|
||||
classIdRenderer.renderClassTypeQualifier(type, printer)
|
||||
if (type.nullability == KtTypeNullability.NULLABLE) {
|
||||
Reference in New Issue
Block a user