From 9011af100847f4e0ffc4b1abaa1118e867ce788b Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Tue, 9 May 2023 11:22:45 +0200 Subject: [PATCH] K2: perform IOT approximation in completion properly #KT-58520 Fixed --- ...rCallCompletionResultsWriterTransformer.kt | 42 +++-- .../firProblems/timesInBuilder.fir.ir.txt | 148 ++++++++++++++++++ .../firProblems/timesInBuilder.fir.kt.txt | 66 ++++++++ 3 files changed, 242 insertions(+), 14 deletions(-) create mode 100644 compiler/testData/ir/irText/firProblems/timesInBuilder.fir.ir.txt create mode 100644 compiler/testData/ir/irText/firProblems/timesInBuilder.fir.kt.txt diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirCallCompletionResultsWriterTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirCallCompletionResultsWriterTransformer.kt index 7c57db244a6..64e07afd2c0 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirCallCompletionResultsWriterTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirCallCompletionResultsWriterTransformer.kt @@ -17,25 +17,27 @@ import org.jetbrains.kotlin.fir.diagnostics.DiagnosticKind import org.jetbrains.kotlin.fir.expressions.* import org.jetbrains.kotlin.fir.expressions.impl.FirPropertyAccessExpressionImpl import org.jetbrains.kotlin.fir.references.FirNamedReference -import org.jetbrains.kotlin.fir.references.builder.buildErrorNamedReference import org.jetbrains.kotlin.fir.references.builder.buildResolvedCallableReference -import org.jetbrains.kotlin.fir.references.builder.buildResolvedErrorReference import org.jetbrains.kotlin.fir.references.builder.buildResolvedNamedReference import org.jetbrains.kotlin.fir.resolve.* import org.jetbrains.kotlin.fir.resolve.calls.Candidate import org.jetbrains.kotlin.fir.resolve.calls.FirErrorReferenceWithCandidate import org.jetbrains.kotlin.fir.resolve.calls.FirNamedReferenceWithCandidate import org.jetbrains.kotlin.fir.resolve.dfa.FirDataFlowAnalyzer -import org.jetbrains.kotlin.fir.resolve.diagnostics.* +import org.jetbrains.kotlin.fir.resolve.diagnostics.ConeConstraintSystemHasContradiction +import org.jetbrains.kotlin.fir.resolve.diagnostics.ConeInapplicableCandidateError +import org.jetbrains.kotlin.fir.resolve.diagnostics.ConePropertyAsOperator +import org.jetbrains.kotlin.fir.resolve.diagnostics.ConeTypeParameterInQualifiedAccess import org.jetbrains.kotlin.fir.resolve.inference.ResolvedLambdaAtom -import org.jetbrains.kotlin.fir.resolve.providers.symbolProvider import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.* import org.jetbrains.kotlin.fir.scopes.impl.ConvertibleIntegerOperators.binaryOperatorsWithSignedArgument import org.jetbrains.kotlin.fir.scopes.impl.isWrappedIntegerOperator import org.jetbrains.kotlin.fir.scopes.impl.isWrappedIntegerOperatorForUnsignedType import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol -import org.jetbrains.kotlin.fir.symbols.impl.* +import org.jetbrains.kotlin.fir.symbols.impl.FirConstructorSymbol +import org.jetbrains.kotlin.fir.symbols.impl.FirNamedFunctionSymbol +import org.jetbrains.kotlin.fir.symbols.impl.FirPropertySymbol import org.jetbrains.kotlin.fir.types.* import org.jetbrains.kotlin.fir.types.builder.buildErrorTypeRef import org.jetbrains.kotlin.fir.types.builder.buildResolvedTypeRef @@ -65,6 +67,18 @@ class FirCallCompletionResultsWriterTransformer( private val mode: Mode = Mode.Normal ) : FirAbstractTreeTransformer(phase = FirResolvePhase.IMPLICIT_TYPES_BODY_RESOLVE) { + private fun finallySubstituteOrNull(type: ConeKotlinType): ConeKotlinType? { + val result = finalSubstitutor.substituteOrNull(type) + if (result == null && type is ConeIntegerLiteralType) { + return type.approximateIntegerLiteralType() + } + return result?.approximateIntegerLiteralType() + } + + private fun finallySubstituteOrSelf(type: ConeKotlinType): ConeKotlinType { + return finallySubstituteOrNull(type) ?: type + } + private val arrayOfCallTransformer = FirArrayOfCallTransformer() private var enableArrayOfCallTransformation = false @@ -309,7 +323,7 @@ class FirCallCompletionResultsWriterTransformer( candidate: Candidate, ): FirResolvedTypeRef { val initialType = candidate.substitutor.substituteOrSelf(type) - val substitutedType = finalSubstitutor.substituteOrNull(initialType) + val substitutedType = finallySubstituteOrNull(initialType) val finalType = typeApproximator.approximateToSuperType( type = substitutedType ?: initialType, TypeApproximatorConfiguration.FinalApproximationAfterResolutionAndInference, ) ?: substitutedType @@ -360,7 +374,7 @@ class FirCallCompletionResultsWriterTransformer( val typeRef = callableReferenceAccess.typeRef as FirResolvedTypeRef val initialType = calleeReference.candidate.substitutor.substituteOrSelf(typeRef.type) - val finalType = finalSubstitutor.substituteOrSelf(initialType) + val finalType = finallySubstituteOrSelf(initialType) val resultType = typeRef.withReplacedConeType(finalType) callableReferenceAccess.replaceTypeRef(resultType) @@ -399,7 +413,7 @@ class FirCallCompletionResultsWriterTransformer( data: Any? ): FirStatement { val originalType = qualifiedAccessExpression.typeRef.coneType - val substitutedReceiverType = finalSubstitutor.substituteOrNull(originalType) ?: return qualifiedAccessExpression + val substitutedReceiverType = finallySubstituteOrNull(originalType) ?: return qualifiedAccessExpression val resolvedTypeRef = qualifiedAccessExpression.typeRef.resolvedTypeFromPrototype(substitutedReceiverType) qualifiedAccessExpression.replaceTypeRef(resolvedTypeRef) session.lookupTracker?.recordTypeResolveAsLookup(resolvedTypeRef, qualifiedAccessExpression.source, context.file.source) @@ -413,11 +427,11 @@ class FirCallCompletionResultsWriterTransformer( private fun FirTypeRef.substitute(candidate: Candidate): ConeKotlinType = coneType.let { candidate.substitutor.substituteOrSelf(it) } - .let { finalSubstitutor.substituteOrSelf(it) } + .let { finallySubstituteOrSelf(it) } private fun Candidate.createArgumentsMapping(): ExpectedArgumentType? { val lambdasReturnType = postponedAtoms.filterIsInstance().associate { - Pair(it.atom, finalSubstitutor.substituteOrSelf(substitutor.substituteOrSelf(it.returnType)).approximateIntegerLiteralType()) + Pair(it.atom, finallySubstituteOrSelf(substitutor.substituteOrSelf(it.returnType))) } val isIntegerOperator = symbol.isWrappedIntegerOperator() @@ -514,7 +528,7 @@ class FirCallCompletionResultsWriterTransformer( return declaration.typeParameters.map { val typeParameter = ConeTypeParameterTypeImpl(it.symbol.toLookupTag(), false) val substitution = candidate.substitutor.substituteOrSelf(typeParameter) - finalSubstitutor.substituteOrSelf(substitution).let { substitutedType -> + finallySubstituteOrSelf(substitution).let { substitutedType -> typeApproximator.approximateToSuperType( substitutedType, TypeApproximatorConfiguration.TypeArgumentApproximation, ) ?: substitutedType @@ -566,14 +580,14 @@ class FirCallCompletionResultsWriterTransformer( val receiverParameter = anonymousFunction.receiverParameter val initialReceiverType = receiverParameter?.typeRef?.coneTypeSafe() - val resultReceiverType = initialReceiverType?.let { finalSubstitutor.substituteOrNull(it) } + val resultReceiverType = initialReceiverType?.let { finallySubstituteOrNull(it) } if (resultReceiverType != null) { receiverParameter.replaceTypeRef(receiverParameter.typeRef.resolvedTypeFromPrototype(resultReceiverType)) needUpdateLambdaType = true } val initialReturnType = anonymousFunction.returnTypeRef.coneTypeSafe() - val expectedReturnType = initialReturnType?.let { finalSubstitutor.substituteOrSelf(it) } + val expectedReturnType = initialReturnType?.let { finallySubstituteOrSelf(it) } ?: expectedType?.returnType(session) as? ConeClassLikeType ?: (data as? ExpectedArgumentType.ArgumentsMap)?.lambdasReturnTypes?.get(anonymousFunction) @@ -649,7 +663,7 @@ class FirCallCompletionResultsWriterTransformer( override fun transformBlock(block: FirBlock, data: ExpectedArgumentType?): FirStatement { val initialType = block.resultType.coneTypeSafe() if (initialType != null) { - val finalType = finalSubstitutor.substituteOrNull(initialType) + val finalType = finallySubstituteOrNull(initialType) var resultType = block.resultType.withReplacedConeType(finalType) resultType.coneTypeSafe()?.let { resultType = resultType.resolvedTypeFromPrototype(it.getApproximatedType(data?.getExpectedType(block)?.fullyExpandedType(session))) diff --git a/compiler/testData/ir/irText/firProblems/timesInBuilder.fir.ir.txt b/compiler/testData/ir/irText/firProblems/timesInBuilder.fir.ir.txt new file mode 100644 index 00000000000..184e28cd2ae --- /dev/null +++ b/compiler/testData/ir/irText/firProblems/timesInBuilder.fir.ir.txt @@ -0,0 +1,148 @@ +FILE fqName: fileName:/timesInBuilder.kt + FUN name:test visibility:private modality:FINAL <> (x:kotlin.Long) returnType:kotlin.Unit + VALUE_PARAMETER name:x index:0 type:kotlin.Long + BLOCK_BODY + RETURN type=kotlin.Nothing from='private final fun test (x: kotlin.Long): kotlin.Unit declared in ' + CALL 'private final fun countIssues (restrictionsBuilder: @[ExtensionFunctionType] kotlin.Function1<.ArgumentsBuilder, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null + restrictionsBuilder: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<.ArgumentsBuilder, kotlin.Unit> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.ArgumentsBuilder) returnType:kotlin.Unit + $receiver: VALUE_PARAMETER name:$this$countIssues type:.ArgumentsBuilder + BLOCK_BODY + CALL 'public final fun unaryPlus (): kotlin.Unit [operator] declared in .ArgumentsBuilder' type=kotlin.Unit origin=null + $this: GET_VAR '$this$countIssues: .ArgumentsBuilder declared in .test.' type=.ArgumentsBuilder origin=null + $receiver: CALL 'public final fun lessEq (t: T of .lessEq): .Expression [infix] declared in ' type=.Expression origin=null + : kotlin.Int + $receiver: CALL 'public final fun (): .Column declared in ' type=.Column origin=GET_PROPERTY + t: CONST Int type=kotlin.Int value=120 + CALL 'public final fun unaryPlus (): kotlin.Unit [operator] declared in .ArgumentsBuilder' type=kotlin.Unit origin=null + $this: GET_VAR '$this$countIssues: .ArgumentsBuilder declared in .test.' type=.ArgumentsBuilder origin=null + $receiver: CALL 'public final fun lessEq (t: T of .lessEq): .Expression [infix] declared in ' type=.Expression origin=null + : kotlin.Int + $receiver: CALL 'public final fun (): .Column declared in ' type=.Column origin=GET_PROPERTY + t: CALL 'public final fun id (arg: I of .id): I of .id declared in ' type=kotlin.Int origin=null + : kotlin.Int + arg: CONST Int type=kotlin.Int value=120 + CALL 'public final fun unaryPlus (): kotlin.Unit [operator] declared in .ArgumentsBuilder' type=kotlin.Unit origin=null + $this: GET_VAR '$this$countIssues: .ArgumentsBuilder declared in .test.' type=.ArgumentsBuilder origin=null + $receiver: CALL 'public final fun select (t: T of .select, r: T of .select): .Expression declared in ' type=.Expression origin=null + : kotlin.Long + $receiver: CALL 'public final fun (): .Column declared in ' type=.Column origin=GET_PROPERTY + t: CONST Long type=kotlin.Long value=120 + r: GET_VAR 'x: kotlin.Long declared in .test' type=kotlin.Long origin=null + PROPERTY name:spentTime visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:spentTime type:.Column visibility:private [final,static] + EXPRESSION_BODY + CALL 'public final fun integer (name: kotlin.String): .Column declared in ' type=.Column origin=null + name: CONST String type=kotlin.String value="spentTime" + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:.Column + correspondingProperty: PROPERTY name:spentTime visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): .Column declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:spentTime type:.Column visibility:private [final,static]' type=.Column origin=null + FUN name:integer visibility:public modality:FINAL <> (name:kotlin.String) returnType:.Column + VALUE_PARAMETER name:name index:0 type:kotlin.String + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun integer (name: kotlin.String): .Column declared in ' + CONSTRUCTOR_CALL 'public constructor () [primary] declared in .Column' type=.Column origin=null + FUN name:id visibility:public modality:FINAL (arg:I of .id) returnType:I of .id + TYPE_PARAMETER name:I index:0 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER name:arg index:0 type:I of .id + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun id (arg: I of .id): I of .id declared in ' + GET_VAR 'arg: I of .id declared in .id' type=I of .id origin=null + FUN name:lessEq visibility:public modality:FINAL ($receiver:.Column, t:T of .lessEq) returnType:.Expression [infix] + TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Comparable.lessEq>] reified:false + $receiver: VALUE_PARAMETER name: type:.Column + VALUE_PARAMETER name:t index:0 type:T of .lessEq + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun lessEq (t: T of .lessEq): .Expression [infix] declared in ' + CONSTRUCTOR_CALL 'public constructor () [primary] declared in .Expression' type=.Expression origin=null + FUN name:select visibility:public modality:FINAL ($receiver:.Column, t:T of .select, r:T of .select) returnType:.Expression + TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Comparable.select>] reified:false + $receiver: VALUE_PARAMETER name: type:.Column + VALUE_PARAMETER name:t index:0 type:T of .select + VALUE_PARAMETER name:r index:1 type:T of .select + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun select (t: T of .select, r: T of .select): .Expression declared in ' + CONSTRUCTOR_CALL 'public constructor () [primary] declared in .Expression' type=.Expression origin=null + CLASS CLASS name:Expression modality:FINAL visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Expression + CONSTRUCTOR visibility:public <> () returnType:.Expression [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Expression modality:FINAL visibility:public superTypes:[kotlin.Any]' + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + CLASS CLASS name:Column modality:FINAL visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Column + CONSTRUCTOR visibility:public <> () returnType:.Column [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Column modality:FINAL visibility:public superTypes:[kotlin.Any]' + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + CLASS CLASS name:ArgumentsBuilder modality:FINAL visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.ArgumentsBuilder + CONSTRUCTOR visibility:public <> () returnType:.ArgumentsBuilder [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:ArgumentsBuilder modality:FINAL visibility:public superTypes:[kotlin.Any]' + PROPERTY name:arguments visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:arguments type:kotlin.collections.MutableList<.Expression> visibility:private [final] + EXPRESSION_BODY + CALL 'public final fun mutableListOf (): kotlin.collections.MutableList [inline] declared in kotlin.collections.CollectionsKt' type=kotlin.collections.MutableList<.Expression> origin=null + : .Expression + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.ArgumentsBuilder) returnType:kotlin.collections.MutableList<.Expression> + correspondingProperty: PROPERTY name:arguments visibility:public modality:FINAL [val] + $this: VALUE_PARAMETER name: type:.ArgumentsBuilder + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlin.collections.MutableList<.Expression> declared in .ArgumentsBuilder' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:arguments type:kotlin.collections.MutableList<.Expression> visibility:private [final]' type=kotlin.collections.MutableList<.Expression> origin=null + receiver: GET_VAR ': .ArgumentsBuilder declared in .ArgumentsBuilder.' type=.ArgumentsBuilder origin=null + FUN name:unaryPlus visibility:public modality:FINAL <> ($this:.ArgumentsBuilder, $receiver:.Expression) returnType:kotlin.Unit [operator] + $this: VALUE_PARAMETER name: type:.ArgumentsBuilder + $receiver: VALUE_PARAMETER name: type:.Expression + BLOCK_BODY + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + CALL 'public abstract fun add (element: E of kotlin.collections.MutableList): kotlin.Boolean declared in kotlin.collections.MutableList' type=kotlin.Boolean origin=null + $this: CALL 'public final fun (): kotlin.collections.MutableList<.Expression> declared in .ArgumentsBuilder' type=kotlin.collections.MutableList<.Expression> origin=GET_PROPERTY + $this: GET_VAR ': .ArgumentsBuilder declared in .ArgumentsBuilder.unaryPlus' type=.ArgumentsBuilder origin=null + element: GET_VAR ': .Expression declared in .ArgumentsBuilder.unaryPlus' type=.Expression origin=null + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN name:countIssues visibility:private modality:FINAL <> (restrictionsBuilder:@[ExtensionFunctionType] kotlin.Function1<.ArgumentsBuilder, kotlin.Unit>) returnType:kotlin.Unit + VALUE_PARAMETER name:restrictionsBuilder index:0 type:@[ExtensionFunctionType] kotlin.Function1<.ArgumentsBuilder, kotlin.Unit> + BLOCK_BODY diff --git a/compiler/testData/ir/irText/firProblems/timesInBuilder.fir.kt.txt b/compiler/testData/ir/irText/firProblems/timesInBuilder.fir.kt.txt new file mode 100644 index 00000000000..0441ce0e429 --- /dev/null +++ b/compiler/testData/ir/irText/firProblems/timesInBuilder.fir.kt.txt @@ -0,0 +1,66 @@ +private fun test(x: Long) { + return countIssues(restrictionsBuilder = local fun ArgumentsBuilder.() { + ($this$countIssues, ().lessEq(t = 120)).unaryPlus() + ($this$countIssues, ().lessEq(t = id(arg = 120))).unaryPlus() + ($this$countIssues, ().select(t = 120L, r = x)).unaryPlus() + } +) +} + +val spentTime: Column + field = integer(name = "spentTime") + get + +fun integer(name: String): Column { + return Column() +} + +fun id(arg: I): I { + return arg +} + +infix fun > Column.lessEq(t: T): Expression { + return Expression() +} + +fun > Column.select(t: T, r: T): Expression { + return Expression() +} + +class Expression { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + +} + +class Column { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + +} + +class ArgumentsBuilder { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + + val arguments: MutableList + field = mutableListOf() + get + + operator fun Expression.unaryPlus() { + .().add(element = ) /*~> Unit */ + } + +} + +private fun countIssues(restrictionsBuilder: @ExtensionFunctionType Function1) { +}