protected fun buildLoopCondition ( builder : DeclarationIrBuilder ) : IrExpression

{ <EOL> with ( builder ) { <EOL> with ( headerInfo . progressionType ) { <EOL> val builtIns = context . irBuiltIns <EOL> val intCompFun = if ( headerInfo . isLastInclusive ) { <EOL> builtIns . lessOrEqualFunByOperandType . getValue ( builtIns . intClass ) <EOL> } else { <EOL> builtIns . lessFunByOperandType . getValue ( builtIns . intClass ) <EOL> } <EOL> val unsignedCompareToFun = if ( this is UnsignedProgressionType ) { <EOL> unsignedType . getClass ( ) ! ! . functions . single { <EOL> it . name == OperatorNameConventions . COMPARE_TO && <EOL> it . dispatchReceiverParameter != null && it . extensionReceiverParameter == null && <EOL> it . valueParameters . size == <NUM_LIT:1> && it . valueParameters [ <NUM_LIT:0> ] . type == unsignedType <EOL> } <EOL> } else null <EOL> val elementCompFun = <EOL> if ( headerInfo . isLastInclusive ) { <EOL> builtIns . lessOrEqualFunByOperandType [ elementClass . symbol ] <EOL> } else { <EOL> builtIns . lessFunByOperandType [ elementClass . symbol ] <EOL> } <EOL> fun conditionForDecreasing ( ) : IrExpression = <EOL> if ( this is UnsignedProgressionType ) { <EOL> irCall ( intCompFun ) . apply { <EOL> putValueArgument ( <NUM_LIT:0> , irCall ( unsignedCompareToFun ! ! ) . apply { <EOL> dispatchReceiver = lastExpression . asUnsigned ( ) <EOL> putValueArgument ( <NUM_LIT:0> , irGet ( inductionVariable ) . asUnsigned ( ) ) <EOL> } ) <EOL> putValueArgument ( <NUM_LIT:1> , irInt ( <NUM_LIT:0> ) ) <EOL> } <EOL> } else { <EOL> irCall ( elementCompFun ! ! ) . apply { <EOL> putValueArgument ( <NUM_LIT:0> , lastExpression ) <EOL> putValueArgument ( <NUM_LIT:1> , irGet ( inductionVariable ) ) <EOL> } <EOL> } <EOL> fun conditionForIncreasing ( ) : IrExpression = <EOL> if ( this is UnsignedProgressionType ) { <EOL> irCall ( intCompFun ) . apply { <EOL> putValueArgument ( <NUM_LIT:0> , irCall ( unsignedCompareToFun ! ! ) . apply { <EOL> dispatchReceiver = irGet ( inductionVariable ) . asUnsigned ( ) <EOL> putValueArgument ( <NUM_LIT:0> , lastExpression . asUnsigned ( ) ) <EOL> } ) <EOL> putValueArgument ( <NUM_LIT:1> , irInt ( <NUM_LIT:0> ) ) <EOL> } <EOL> } else { <EOL> irCall ( elementCompFun ! ! ) . apply { <EOL> putValueArgument ( <NUM_LIT:0> , irGet ( inductionVariable ) ) <EOL> putValueArgument ( <NUM_LIT:1> , lastExpression ) <EOL> } <EOL> } <EOL> return when ( headerInfo . direction ) { <EOL> ProgressionDirection . DECREASING -> conditionForDecreasing ( ) <EOL> ProgressionDirection . INCREASING -> conditionForIncreasing ( ) <EOL> ProgressionDirection . UNKNOWN -> { <EOL> context . oror ( context . andand ( irCall ( builtIns . greaterFunByOperandType . getValue ( stepClass . symbol ) ) . apply { <EOL> putValueArgument ( <NUM_LIT:0> , stepExpression . shallowCopy ( ) ) <EOL> putValueArgument ( <NUM_LIT:1> , zeroStepExpression ( ) ) <EOL> } , conditionForIncreasing ( ) ) , context . andand ( irCall ( builtIns . lessFunByOperandType . getValue ( stepClass . symbol ) ) . apply { <EOL> putValueArgument ( <NUM_LIT:0> , stepExpression . shallowCopy ( ) ) <EOL> putValueArgument ( <NUM_LIT:1> , zeroStepExpression ( ) ) <EOL> } , conditionForDecreasing ( ) ) ) <EOL> } <EOL> } <EOL> } <EOL> } <EOL> }


fun testD ( x : Comparable < Double > , y : Comparable < Double > )

= x is Double && y is Double && x < y


fun testF ( x : Comparable < Float > , y : Comparable < Float > )

= x is Float && y is Float && x < y


override fun check ( declaration : FirRegularClass , context : CheckerContext , reporter : DiagnosticReporter )

{ <EOL> if ( ( declaration . classKind . isSingleton || declaration . classKind == ClassKind . ENUM_CLASS ) && declaration . isLocal ) return <EOL> val containingDeclaration = context . containingDeclarations . lastOrNull ( ) as? FirClass ? : return <EOL> if ( containingDeclaration . classKind == ClassKind . ENUM_ENTRY && ! declaration . isInner && ! declaration . isCompanion ) { <EOL> reporter . reportOn ( declaration . source , NESTED_CLASS_NOT_ALLOWED , declaration . description , context ) <EOL> return <EOL> } <EOL> val containerIsLocal = containingDeclaration . effectiveVisibility == EffectiveVisibility . Local <EOL> if ( ! declaration . isInner && ( containingDeclaration . isInner || containerIsLocal || context . isInsideAnonymousObject ) ) { <EOL> reporter . reportOn ( declaration . source , NESTED_CLASS_NOT_ALLOWED , declaration . description , context ) <EOL> } <EOL> }


fun f1 ( value : Pair < String , String > ) : Boolean

{ <EOL> val ( `false` , `true` ) = value <EOL> if ( `false` != "<STR_LIT:1>" ) return false <EOL> if ( `true` != "<STR_LIT:2>" ) return false <EOL> return true <EOL> }


{ <EOL> var i = <NUM_LIT:0> <EOL> for ( `false` : Int in <NUM_LIT:0> .. <NUM_LIT:10> ) { <EOL> i ++ <EOL> } <EOL> if ( ! `true` ( false ) ) return null <EOL> val `true` = { `false` : Boolean , `true` : Int -> true } <EOL> var `false` : Boolean <EOL> `false` = false <EOL> if ( ! f1 ( Pair ( "<STR_LIT:1>" , "<STR_LIT:2>" ) ) ) return null <EOL> if ( i != <NUM_LIT:11> ) return null <EOL> if ( ! `true` ( false , <NUM_LIT:10> ) ) return null <EOL> if ( `false` ) return null <EOL> return "<STR_LIT:OK>" <EOL> }


{ <EOL> val chars = mapOf ( '<CHAR_LIT>' to <NUM_LIT> , '<CHAR_LIT>' to <NUM_LIT> , '<CHAR_LIT>' to <NUM_LIT> , '<CHAR_LIT>' to <NUM_LIT> , '<CHAR_LIT>' to <NUM_LIT> , '<CHAR_LIT>' to <NUM_LIT> , '<CHAR_LIT>' to <NUM_LIT> , '<CHAR_LIT>' to <NUM_LIT> , '<CHAR_LIT>' to <NUM_LIT> ) <EOL> for ( ( char , code ) in chars ) { <EOL> assertEquals ( code , char . toInt ( ) ) <EOL> assertEquals ( char , code . toChar ( ) ) <EOL> } <EOL> return "<STR_LIT:OK>" <EOL> }


{ <EOL> run { <EOL> ok = "<STR_LIT:OK>" <EOL> } <EOL> return ok <EOL> }


public fun foo ( vararg p : String )


public fun dummy ( )


override fun foo ( vararg p : String )


fun < R > myRun ( block : ( ) -> R ) : R

{ <EOL> return block ( ) <EOL> }


{ <EOL> val a : String = foo <EOL> }


@ Test <EOL> fun able_to_create_main_tag ( )

{ <EOL> val tree = createHTMLDocument ( ) . html { <EOL> body { <EOL> main ( classes = "<STR_LIT>" ) { <EOL> id = "<STR_LIT>" <EOL> + "<STR_LIT>" <EOL> } <EOL> } <EOL> } <EOL> print ( tree . serialize ( true ) . trim ( ) . replace ( "<STR_LIT>" , "<STR_LIT:\n>" ) ) <EOL> assertEquals ( "<STR_LIT>" , tree . serialize ( false ) ) <EOL> assertEquals ( """<STR_LIT>""" . trimIndent ( ) , tree . serialize ( true ) . trim ( ) . replace ( "<STR_LIT>" , "<STR_LIT:\n>" ) ) <EOL> }


@ Test <EOL> fun `able to create complex tree and render it with pretty print` ( )

{ <EOL> val tree = createHTMLDocument ( ) . html { <EOL> body { <EOL> h1 { <EOL> + "<STR_LIT>" <EOL> } <EOL> div { <EOL> + "<STR_LIT>" <EOL> span { <EOL> + "<STR_LIT>" <EOL> } <EOL> } <EOL> } <EOL> } <EOL> assertEquals ( "<STR_LIT>" , tree . serialize ( false ) ) <EOL> val serialize = tree . serialize ( true ) <EOL> assertEquals ( """<STR_LIT>""" . trimIndent ( ) , serialize . trim ( ) . replace ( "<STR_LIT>" , "<STR_LIT:\n>" ) ) <EOL> }


= IntCell ( <NUM_LIT:5> )


= value > <NUM_LIT:0>


= value --


{ <EOL> for ( i in FiveTimes ) { <EOL> println ( i ) <EOL> } <EOL> }


{ <EOL> var result = MyString ( name ) <EOL> result += "<STR_LIT:K>" <EOL> return result . content <EOL> }


private operator fun MyString . plus ( suffix : String ) : MyString

= MyString ( "<STR_LIT>" )


{ <EOL> return Greeter . sayHello ( "<STR_LIT:O>" ) <EOL> }


fun findAndExpand ( vararg path : ( ) -> String ) : List < String >

= TODO ( )


inline fun < reified T : C > foo ( bar : String ? ) : T ?

= TODO ( )


{ <EOL> return Baz ( ) . bar <EOL> }


override fun collectShortenings ( file : KtFile , selection : TextRange , shortenOptions : ShortenOptions , classShortenStrategy : ( KtClassLikeSymbol ) -> ShortenStrategy , callableShortenStrategy : ( KtCallableSymbol ) -> ShortenStrategy , ) : ShortenCommand

{ <EOL> val ktFilePointer = SmartPointerManager . createPointer ( file ) <EOL> return object : ShortenCommand { <EOL> override val targetFile : SmartPsiElementPointer < KtFile > get ( ) = ktFilePointer <EOL> override val importsToAdd : Set < FqName > get ( ) = emptySet ( ) <EOL> override val starImportsToAdd : Set < FqName > get ( ) = emptySet ( ) <EOL> override val listOfTypeToShortenInfo : List < TypeToShortenInfo > get ( ) = emptyList ( ) <EOL> override val listOfQualifierToShortenInfo : List < QualifierToShortenInfo > get ( ) = emptyList ( ) <EOL> override val thisLabelsToShorten : List < ThisLabelToShortenInfo > = emptyList ( ) <EOL> override val kDocQualifiersToShorten : List < SmartPsiElementPointer < KDocName > > get ( ) = emptyList ( ) <EOL> override val isEmpty : Boolean get ( ) = true <EOL> } <EOL> }


override fun < T > injectCoroutineContext ( publisher : Publisher < T > , coroutineContext : CoroutineContext ) : Publisher < T >

{ <EOL> val reactorContext = coroutineContext [ ReactorContext ] ? . context ? : return publisher <EOL> return when ( publisher ) { <EOL> is Mono -> publisher . contextWrite ( reactorContext ) <EOL> is Flux -> publisher . contextWrite ( reactorContext ) <EOL> else -> publisher <EOL> } <EOL> }

/**
 * Injects all values from the [ReactorContext] entry of the given coroutine context
 * into the downstream [Context] of Reactor's [Publisher] instances of [Mono] or [Flux].
 */


fun replaceRenderConfiguration ( renderConfiguration : DiagnosticCodeMetaInfoRenderConfiguration )

{ <EOL> this . renderConfiguration = renderConfiguration <EOL> }


= renderConfiguration . asString ( this )


{ <EOL> }


{ <EOL> val outerBuildee = build outerBuild @ { <EOL> val innerBuildee = build innerBuild @ { <EOL> this@outerBuild . setTypeVariable ( TargetType ( ) ) <EOL> this@innerBuild . setTypeVariable ( TargetType ( ) ) <EOL> } <EOL> checkExactType < Buildee < TargetType > > ( innerBuildee ) <EOL> } <EOL> checkExactType < Buildee < TargetType > > ( outerBuildee ) <EOL> }


{ storage = value }


fun < PTV > build ( instructions : Buildee < PTV > . ( ) -> Unit ) : Buildee < PTV >

{ <EOL> return Buildee < PTV > ( ) . apply ( instructions ) <EOL> }


public abstract fun forward ( tf : Ops , input : Operand < Float > ) : Operand < Float >

/**
 * Applies the activation functions to the [input] to produce the output.
 *
 * @param [tf] TensorFlow graph API for building operations.
 * @param [input] TensorFlow graph leaf node representing layer output before activation function.
 */


override fun build ( tf : Ops , input : Operand < Float > , isTraining : Operand < Boolean > , numberOfLosses : Operand < Float > ? <EOL> ) : Operand < Float >

= forward ( tf , input )


fun isAllowed ( qualifiedName : String ) : Boolean

/**
 * @return **true** if an annotations with [qualifiedName] is allowed
 */


fun filtered ( annotations : Collection < PsiAnnotation > ) : Collection < PsiAnnotation >

/**
 * @return a filtered collection where each annotation in a list has an allowed qualifier
 */


@ OptIn ( DokkaPluginApiPreview :: class ) <EOL> override fun pluginApiPreviewAcknowledgement ( ) : PluginApiPreviewAcknowledgement

= <EOL> PluginApiPreviewAcknowledgement


override fun invoke ( input : RootPageNode ) : RootPageNode

= input . transformContentPagesTree { <EOL> it . modified ( embeddedResources = it . embeddedResources + if ( it . isNeedingMathjax ) listOf ( LIB_PATH ) else emptyList ( ) ) <EOL> }


override fun isApplicable ( customTag : CustomTagWrapper ) : Boolean

= customTag . name == ANNOTATION


override fun DocumentableContentBuilder . contentForDescription ( sourceSet : DokkaConfiguration . DokkaSourceSet , customTag : CustomTagWrapper )

{ <EOL> comment ( customTag . root , sourceSets = setOf ( sourceSet ) ) <EOL> }


public expect inline fun < reified T > Array < out T > ? . orEmpty ( ) : Array < out T >

/**
 * Returns the array if it's not `null`, or an empty array otherwise.
 * @sample samples.collections.Arrays.Usage.arrayOrEmpty
 */


public expect inline fun < reified T > Collection < T > . toTypedArray ( ) : Array < T >

/**
 * Returns a *typed* array containing all the elements of this collection.
 *
 * Allocates an array of runtime type `T` having its size equal to the size of this collection
 * and populates the array with the elements of this collection.
 * @sample samples.collections.Collections.Collections.collectionToTypedArray
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun < T > MutableList < T > . fill ( value : T ) : Unit

/**
 * Fills the list with the provided [value].
 *
 * Each element in the list gets replaced with the [value].
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun < T > MutableList < T > . shuffle ( ) : Unit

/**
 * Randomly shuffles elements in this list.
 *
 * See: https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#The_modern_algorithm
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun < T > Iterable < T > . shuffled ( ) : List < T >

/**
 * Returns a new list with the elements of this collection randomly shuffled.
 */


public expect fun < T : Comparable < T > > MutableList < T > . sort ( ) : Unit

/**
 * Sorts elements in the list in-place according to their natural sort order.
 *
 * The sort is _stable_. It means that equal elements preserve their order relative to each other after sorting.
 *
 * @sample samples.collections.Collections.Sorting.sortMutableList
 */


public expect fun < T > MutableList < T > . sortWith ( comparator : Comparator < in T > ) : Unit

/**
 * Sorts elements in the list in-place according to the order specified with [comparator].
 *
 * The sort is _stable_. It means that equal elements preserve their order relative to each other after sorting.
 *
 * @sample samples.collections.Collections.Sorting.sortMutableListWith
 */


public expect fun < T , K > Grouping < T , K > . eachCount ( ) : Map < K , Int >


internal expect fun collectionToArray ( collection : Collection < * > ) : Array < Any ? >


internal expect fun < T > collectionToArray ( collection : Collection < * > , array : Array < T > ) : Array < T >


internal expect fun < T > arrayOfNulls ( reference : Array < T > , size : Int ) : Array < T >


internal expect fun < K , V > Map < K , V > . toSingletonMapOrSelf ( ) : Map < K , V >


internal expect fun < K , V > Map < out K , V > . toSingletonMap ( ) : Map < K , V >


internal expect fun < T > Array < out T > . copyToArrayOfAny ( isVarargs : Boolean ) : Array < out Any ? >


fun foo ( )


fun foo ( ) : Any ?


fun foo ( ) : String


{ <EOL> if ( x is A ) { <EOL> val k = x . foo ( ) <EOL> if ( k != "<STR_LIT:OK>" ) return "<STR_LIT:failU+00201>" <EOL> } <EOL> if ( x is B ) { <EOL> val k = x . foo ( ) <EOL> if ( k . length != <NUM_LIT:2> ) return "<STR_LIT:failU+00202>" <EOL> } <EOL> if ( x is A && x is B ) { <EOL> return x . foo ( ) <EOL> } <EOL> return "<STR_LIT:failU+00204>" <EOL> }


= bar ( object : A , B { override fun foo ( ) = "<STR_LIT:OK>" } )


fun filtersPlot ( conv2DLayer : Conv2D , plotFeature : PlotFeature = PlotFeature . GRAY , imageSize : Int = <NUM_LIT> , columns : Int = <NUM_LIT:8> ) : Figure

{ <EOL> @ Suppress ( "<STR_LIT:UNCHECKED_CAST>" ) <EOL> val weights = conv2DLayer . weights . values . toTypedArray ( ) [ <NUM_LIT:0> ] as TensorImageData <EOL> val xyInOut = extractXYInputOutputAxeSizes ( weights , FILTER_LAYERS_PERMUTATION ) <EOL> val plots = cartesianProductIndices ( xyInOut [ <NUM_LIT:2> ] , xyInOut [ <NUM_LIT:3> ] ) . map { ( i , o ) -> <EOL> xyPlot ( xyInOut [ <NUM_LIT:0> ] , xyInOut [ <NUM_LIT:1> ] , plotFeature ) { x , y -> <EOL> weights [ y ] [ x ] [ i ] [ o ] <EOL> } <EOL> } <EOL> return columnPlot ( plots , columns , imageSize ) <EOL> }

/**
 * Create a column plot of tile plots for weights of Conv2D layer filters.
 *
 * @param conv2DLayer which weights will be changed to tile plot
 * @param plotFeature filling colors of the created plot
 * @param imageSize size of width and height of single plot in px
 * @param columns number of columns in which the single filters plots are arranged
 * @return a figure representing the weights plots
 */


fun modelActivationOnLayersPlot ( model : TrainableModel , x : FloatData , plotFeature : PlotFeature = PlotFeature . GRAY , imageSize : Int = <NUM_LIT> , columns : Int = <NUM_LIT:8> , ) : List < Figure >

{ <EOL> val activations = model . predictAndGetActivations ( x ) . second <EOL> @ Suppress ( "<STR_LIT:UNCHECKED_CAST>" ) <EOL> val activationArrays = activations . mapNotNull { it as? TensorImageData } <EOL> return activationArrays . map { weights -> <EOL> val xyInOut = extractXYInputOutputAxeSizes ( weights , ACTIVATION_LAYERS_PERMUTATION ) <EOL> val plots = cartesianProductIndices ( xyInOut [ <NUM_LIT:2> ] , xyInOut [ <NUM_LIT:3> ] ) . map { ( i , o ) -> <EOL> xyPlot ( xyInOut [ <NUM_LIT:0> ] , xyInOut [ <NUM_LIT:1> ] , plotFeature ) { x , y -> <EOL> weights [ i ] [ y ] [ x ] [ o ] <EOL> } <EOL> } <EOL> columnPlot ( plots , columns , imageSize ) <EOL> } <EOL> }

/**
 * Create a list of columns plots for model activation on layers.
 * The model is evaluated on given input and the obtained activations arrays
 * of the following layers are converted into separated figures with columns
 * plots of the weights for the filters in [Conv2D] layers
 *
 * @param model that is evaluated to get the activations on its weights
 * @param x input for model evaluation
 * @param plotFeature filling colors of the created plot
 * @param imageSize size of width and height of single plot in px
 * @param columns number of columns in which the single filters plots are arranged
 * @return list of figures representing the activations plots for model evaluation
 */


private fun MethodSignatureDeclaration . convertToMethod ( ) : MethodDeclaration

{ <EOL> return MethodDeclaration ( name = name , parameters = parameters , typeParameters = typeParameters , type = type , modifiers = modifiers , body = null , optional = optional , isGenerator = false ) <EOL> }


private fun mergeParentEntities ( parentEntitiesA : List < HeritageClauseDeclaration > , parentEntitiesB : List < HeritageClauseDeclaration > ) : List < HeritageClauseDeclaration >

{ <EOL> val parentSet = parentEntitiesA . toSet ( ) <EOL> return parentEntitiesA + parentEntitiesB . filter { parentEntity -> ! parentSet . contains ( parentEntity ) } <EOL> }


private fun mergeInterfaces ( a : InterfaceDeclaration , b : InterfaceDeclaration ) : InterfaceDeclaration

{ <EOL> return a . copy ( members = b . members + a . members , typeParameters = if ( b . typeParameters . size > a . typeParameters . size ) { <EOL> b . typeParameters <EOL> } else { <EOL> a . typeParameters <EOL> } , parentEntities = mergeParentEntities ( a . parentEntities , b . parentEntities ) ) <EOL> }


override fun lowerTypeParamReferenceDeclaration ( declaration : TypeParamReferenceDeclaration ) : ParameterValueDeclaration

{ <EOL> return typeParamMap . get ( declaration . value ) ? : declaration <EOL> }


private fun resolveParentMethods ( classLikeDeclaration : ClassLikeDeclaration ) : List < MemberDeclaration >

{ <EOL> return classLikeDeclaration . parentEntities . flatMap { heritageClause -> <EOL> val parentClass = topLevelDeclarationResolver . resolveRecursive ( heritageClause . typeReference ? . uid ) <EOL> if ( parentClass is ClassLikeDeclaration ) { <EOL> val typeParams = parentClass . typeParameters . mapIndexed { index , typeParam -> <EOL> Pair ( typeParam . name , heritageClause . typeArguments . getOrNull ( index ) ) <EOL> } . toMap ( ) <EOL> ( ( SpecifyTypeReferenceLowering ( typeParams ) . lowerClassLikeDeclaration ( parentClass , null ) as? ClassLikeDeclaration ) ? . let { resolveClass -> <EOL> resolveClass . members <EOL> } ? : emptyList ( ) ) + resolveParentMethods ( parentClass ) <EOL> } else { <EOL> emptyList ( ) <EOL> } <EOL> } <EOL> }


private fun mergeClassAndInterface ( a : ClassDeclaration , b : InterfaceDeclaration , uid : String ) : ClassDeclaration

{ <EOL> val parentMembers = resolveParentMethods ( b ) <EOL> val membersResolved = ( parentMembers + b . members ) . map { <EOL> when ( it ) { <EOL> is MethodSignatureDeclaration -> it . convertToMethod ( ) <EOL> else -> it <EOL> } <EOL> } + a . members <EOL> return a . copy ( members = membersResolved , typeParameters = if ( b . typeParameters . size > a . typeParameters . size ) { <EOL> b . typeParameters <EOL> } else { <EOL> a . typeParameters <EOL> } , parentEntities = mergeParentEntities ( a . parentEntities , b . parentEntities ) , uid = uid ) <EOL> }


private fun merge ( a : MergeableDeclaration , b : MergeableDeclaration ) : MergeableDeclaration

{ <EOL> return when ( a ) { <EOL> is InterfaceDeclaration -> when ( b ) { <EOL> is InterfaceDeclaration -> mergeInterfaces ( a , b ) <EOL> is ClassDeclaration -> mergeClassAndInterface ( b , a , a . uid ) <EOL> else -> a <EOL> } <EOL> is ClassDeclaration -> when ( b ) { <EOL> is InterfaceDeclaration -> mergeClassAndInterface ( a , b , a . uid ) <EOL> else -> a <EOL> } <EOL> is VariableDeclaration -> when ( b ) { <EOL> is InterfaceDeclaration -> b <EOL> else -> a <EOL> } <EOL> else -> a <EOL> } <EOL> }


override fun lowerClassLikeDeclaration ( declaration : ClassLikeDeclaration , owner : NodeOwner < ModuleDeclaration > ? ) : TopLevelDeclaration ?

{ <EOL> val definitions = declaration . definitionsInfo <EOL> . mapNotNull { definition -> topLevelDeclarationResolver . resolve ( definition . uid ) } <EOL> . filterIsInstance ( ClassLikeDeclaration :: class . java ) <EOL> val onlyClassLikes = definitions . isNotEmpty ( ) <EOL> return if ( onlyClassLikes ) { <EOL> if ( declaration . uid == definitions . firstOrNull ( ) ? . uid ) { <EOL> @ Suppress ( "<STR_LIT:UNCHECKED_CAST>" ) <EOL> ( definitions as List < MergeableDeclaration > ) . reduce { acc , definitionInfoDeclaration -> merge ( acc , definitionInfoDeclaration ) } <EOL> } else { <EOL> null <EOL> } <EOL> } else { <EOL> declaration <EOL> } <EOL> }


private fun SourceSetDeclaration . mergeInterfaces ( topLevelDeclarationResolver : TopLevelDeclarationResolver ) : SourceSetDeclaration

{ <EOL> return copy ( sources = sources . map { it . copy ( root = MergeClassLikesLowering ( topLevelDeclarationResolver ) . lowerSourceDeclaration ( it . root ) ) } ) <EOL> }


override fun lower ( source : SourceSetDeclaration ) : SourceSetDeclaration

{ <EOL> val topLevelDeclarationResolver = TopLevelDeclarationResolver ( source ) <EOL> return source . mergeInterfaces ( topLevelDeclarationResolver ) <EOL> }


fun < R > TagConsumer < R > . trace ( ) : TagConsumer < R >

= TraceConsumer ( this , println = :: println )


fun testSealed ( m : MySealedInterface ) : String

{ <EOL> return when ( m ) { <EOL> is OneSealedChild -> "<STR_LIT:1>" <EOL> } <EOL> }


{ <EOL> ignoreLostThreads ( "<STR_LIT>" ) <EOL> }


= SwingUtilities . isEventDispatchThread ( )


override fun scheduleOnMainQueue ( block : ( ) -> Unit )

{ <EOL> SwingUtilities . invokeLater { block ( ) } <EOL> }


{ <EOL> assertSame ( Dispatchers . Swing , Dispatchers . Main ) <EOL> }

/** Tests that the Main dispatcher is in fact the JavaFx one. */


= runBlocking < Unit > { <EOL> val job = launch { <EOL> repeat ( <NUM_LIT> ) { i -> <EOL> println ( "<STR_LIT>" ) <EOL> delay ( <NUM_LIT> ) <EOL> } <EOL> } <EOL> delay ( <NUM_LIT> ) <EOL> println ( "<STR_LIT>" ) <EOL> job . cancelAndJoin ( ) <EOL> println ( "<STR_LIT>" ) <EOL> }


= println ( "<STR_LIT>" )


private fun IrType . findEqualsMethod ( ) : IrSimpleFunction

{ <EOL> val klass = getClass ( ) ? : irBuiltins . anyClass . owner <EOL> return klass . functions . single { it . isEqualsInheritedFromAny ( ) } <EOL> }


private fun transformCall ( call : IrCall , builder : DeclarationIrBuilder ) : IrExpression

{ <EOL> when ( val symbol = call . symbol ) { <EOL> irBuiltins . linkageErrorSymbol -> { <EOL> return irCall ( call , context . wasmSymbols . throwLinkageError ) <EOL> } <EOL> irBuiltins . ieee754equalsFunByOperandType [ irBuiltins . floatClass ] -> { <EOL> if ( call . getValueArgument ( <NUM_LIT:0> ) ! ! . type . isNullable ( ) || call . getValueArgument ( <NUM_LIT:1> ) ! ! . type . isNullable ( ) ) { <EOL> return irCall ( call , symbols . nullableFloatIeee754Equals ) <EOL> } <EOL> return irCall ( call , symbols . floatEqualityFunctions . getValue ( irBuiltins . floatType ) ) <EOL> } <EOL> irBuiltins . ieee754equalsFunByOperandType [ irBuiltins . doubleClass ] -> { <EOL> if ( call . getValueArgument ( <NUM_LIT:0> ) ! ! . type . isNullable ( ) || call . getValueArgument ( <NUM_LIT:1> ) ! ! . type . isNullable ( ) ) { <EOL> return irCall ( call , symbols . nullableDoubleIeee754Equals ) <EOL> } <EOL> return irCall ( call , symbols . floatEqualityFunctions . getValue ( irBuiltins . doubleType ) ) <EOL> } <EOL> irBuiltins . eqeqSymbol , <EOL> irBuiltins . eqeqeqSymbol -> { <EOL> fun callRefIsNull ( expr : IrExpression ) : IrCall { <EOL> if ( ! context . isWasmJsTarget && expr . type . erasedUpperBound ? . isExternal == true ) { <EOL> error ( "<STR_LIT>" ) <EOL> } <EOL> val refIsNull = if ( expr . type . erasedUpperBound ? . isExternal == true ) symbols . jsRelatedSymbols . externRefIsNull else symbols . refIsNull <EOL> return builder . irCall ( refIsNull ) . apply { putValueArgument ( <NUM_LIT:0> , expr ) } <EOL> } <EOL> val lhs = call . getValueArgument ( <NUM_LIT:0> ) ! ! <EOL> val rhs = call . getValueArgument ( <NUM_LIT:1> ) ! ! <EOL> if ( lhs . isNullConst ( ) ) return callRefIsNull ( rhs ) <EOL> if ( rhs . isNullConst ( ) ) return callRefIsNull ( lhs ) <EOL> val lhsType = lhs . type <EOL> val rhsType = rhs . type <EOL> if ( lhsType == rhsType ) { <EOL> val newSymbol = <EOL> symbols . equalityFunctions [ lhsType ] <EOL> ? : if ( call . symbol === irBuiltins . eqeqeqSymbol ) symbols . floatEqualityFunctions [ lhsType ] else null <EOL> if ( newSymbol != null ) { <EOL> return irCall ( call , newSymbol ) <EOL> } <EOL> } <EOL> if ( call . symbol === irBuiltins . eqeqSymbol && ! lhsType . isNullable ( ) && ! lhsType . isNothing ( ) ) { <EOL> return irCall ( call , lhsType . findEqualsMethod ( ) . symbol , argumentsAsReceivers = true ) <EOL> } <EOL> val fallbackEqFun = if ( call . symbol === irBuiltins . eqeqeqSymbol ) symbols . refEq else symbols . nullableEquals <EOL> return irCall ( call , fallbackEqFun ) <EOL> } <EOL> irBuiltins . checkNotNullSymbol -> { <EOL> val arg = call . getValueArgument ( <NUM_LIT:0> ) ! ! <EOL> if ( arg . isNullConst ( ) ) { <EOL> return builder . irCall ( symbols . throwNullPointerException ) <EOL> } <EOL> return builder . irComposite { <EOL> val temporary = irTemporary ( arg ) <EOL> + builder . irIfNull ( type = arg . type . makeNotNull ( ) , subject = irGet ( temporary ) , thenPart = builder . irCall ( symbols . throwNullPointerException ) , elsePart = irGet ( temporary ) ) <EOL> } <EOL> } <EOL> in symbols . comparisonBuiltInsToWasmIntrinsics . keys -> { <EOL> val newSymbol = symbols . comparisonBuiltInsToWasmIntrinsics [ symbol ] ! ! <EOL> return irCall ( call , newSymbol ) <EOL> } <EOL> irBuiltins . noWhenBranchMatchedExceptionSymbol -> <EOL> return builder . irCall ( symbols . throwNoBranchMatchedException , irBuiltins . nothingType ) <EOL> irBuiltins . illegalArgumentExceptionSymbol -> <EOL> return builder . irCall ( symbols . throwIAE , irBuiltins . nothingType , <NUM_LIT:1> ) . apply { <EOL> putValueArgument ( <NUM_LIT:0> , call . getValueArgument ( <NUM_LIT:0> ) ! ! ) <EOL> } <EOL> irBuiltins . dataClassArrayMemberHashCodeSymbol , irBuiltins . dataClassArrayMemberToStringSymbol -> { <EOL> val argument = call . getValueArgument ( <NUM_LIT:0> ) ! ! <EOL> val argumentType = argument . type <EOL> val overloadSymbol : IrSimpleFunctionSymbol <EOL> val returnType : IrType <EOL> if ( symbol == irBuiltins . dataClassArrayMemberHashCodeSymbol ) { <EOL> overloadSymbol = symbols . findContentHashCodeOverload ( argumentType ) <EOL> returnType = irBuiltins . intType <EOL> } else { <EOL> overloadSymbol = symbols . findContentToStringOverload ( argumentType ) <EOL> returnType = irBuiltins . stringType <EOL> } <EOL> return builder . irCall ( overloadSymbol , returnType , ) . apply { <EOL> extensionReceiver = argument <EOL> if ( argumentType . classOrNull == irBuiltins . arrayClass ) { <EOL> putTypeArgument ( <NUM_LIT:0> , argumentType . getArrayElementType ( irBuiltins ) ) <EOL> } <EOL> } <EOL> } <EOL> in symbols . startCoroutineUninterceptedOrReturnIntrinsics -> { <EOL> val arity = symbols . startCoroutineUninterceptedOrReturnIntrinsics . indexOf ( symbol ) <EOL> val newSymbol = irBuiltins . suspendFunctionN ( arity ) . getSimpleFunction ( "<STR_LIT>" ) ! ! <EOL> return irCall ( call , newSymbol , argumentsAsReceivers = true ) <EOL> } <EOL> context . reflectionSymbols . getKClass -> { <EOL> val type = call . getTypeArgument ( <NUM_LIT:0> ) ! ! <EOL> val klass = type . classOrNull ? . owner ? : error ( "<STR_LIT>" ) <EOL> val constructorArgument : IrExpression <EOL> val kclassConstructor : IrConstructor <EOL> if ( klass . isEffectivelyExternal ( ) ) { <EOL> check ( context . isWasmJsTarget ) { "<STR_LIT>" } <EOL> kclassConstructor = symbols . jsRelatedSymbols . kExternalClassImpl . owner . constructors . first ( ) <EOL> constructorArgument = getExternalKClassCtorArgument ( type , builder ) <EOL> } else { <EOL> kclassConstructor = symbols . reflectionSymbols . kClassImpl . owner . constructors . first ( ) <EOL> constructorArgument = getKClassCtorArgument ( type , builder ) <EOL> } <EOL> return IrConstructorCallImpl ( startOffset = UNDEFINED_OFFSET , endOffset = UNDEFINED_OFFSET , type = kclassConstructor . returnType , symbol = kclassConstructor . symbol , typeArgumentsCount = <NUM_LIT:1> , valueArgumentsCount = <NUM_LIT:1> , constructorTypeArgumentsCount = <NUM_LIT:0> ) . also { <EOL> it . putClassTypeArgument ( <NUM_LIT:0> , type ) <EOL> it . putValueArgument ( <NUM_LIT:0> , constructorArgument ) <EOL> } <EOL> } <EOL> symbols . enumValueOfIntrinsic -> <EOL> return EnumIntrinsicsUtils . transformEnumValueOfIntrinsic ( call ) <EOL> symbols . enumValuesIntrinsic -> <EOL> return EnumIntrinsicsUtils . transformEnumValuesIntrinsic ( call ) <EOL> symbols . enumEntriesIntrinsic -> <EOL> return EnumIntrinsicsUtils . transformEnumEntriesIntrinsic ( call ) <EOL> } <EOL> return call <EOL> }


private fun getKClassCtorArgument ( type : IrType , builder : DeclarationIrBuilder ) : IrExpression

{ <EOL> val klass = type . classOrNull ? . owner ? : error ( "<STR_LIT>" ) <EOL> val typeId = builder . irCall ( symbols . wasmTypeId ) . also { <EOL> it . putTypeArgument ( <NUM_LIT:0> , type ) <EOL> } <EOL> if ( ! klass . isInterface ) { <EOL> return builder . irCall ( context . wasmSymbols . reflectionSymbols . getTypeInfoTypeDataByPtr ) . also { <EOL> it . putValueArgument ( <NUM_LIT:0> , typeId ) <EOL> } <EOL> } else { <EOL> val fqName = type . classFqName ! ! <EOL> val fqnShouldBeEmitted = <EOL> context . configuration . languageVersionSettings . getFlag ( AnalysisFlags . allowFullyQualifiedNameInKClass ) <EOL> val packageName = if ( fqnShouldBeEmitted ) fqName . parentOrNull ( ) ? . asString ( ) ? : "<STR_LIT>" else "<STR_LIT>" <EOL> val typeName = fqName . shortName ( ) . asString ( ) <EOL> return builder . irCallConstructor ( symbols . reflectionSymbols . wasmTypeInfoData . constructors . first ( ) , emptyList ( ) ) . also { <EOL> it . putValueArgument ( <NUM_LIT:0> , typeId ) <EOL> it . putValueArgument ( <NUM_LIT:1> , packageName . toIrConst ( context . irBuiltIns . stringType ) ) <EOL> it . putValueArgument ( <NUM_LIT:2> , typeName . toIrConst ( context . irBuiltIns . stringType ) ) <EOL> } <EOL> } <EOL> }


private fun getExternalKClassCtorArgument ( type : IrType , builder : DeclarationIrBuilder ) : IrExpression

{ <EOL> val klass = type . classOrNull ? . owner ? : error ( "<STR_LIT>" ) <EOL> check ( klass . kind != ClassKind . INTERFACE ) { "<STR_LIT>" } <EOL> val classGetClassFunction = context . mapping . wasmGetJsClass [ klass ] ! ! <EOL> val wrappedGetClassIfAny = context . mapping . wasmJsInteropFunctionToWrapper [ classGetClassFunction ] ? : classGetClassFunction <EOL> return builder . irCall ( wrappedGetClassIfAny ) <EOL> }


{ <EOL> val builder = context . createIrBuilder ( irFile . symbol ) <EOL> irFile . transformChildrenVoid ( object : IrElementTransformerVoidWithContext ( ) { <EOL> override fun visitCall ( expression : IrCall ) : IrExpression { <EOL> val newExpression = transformCall ( expression , builder ) <EOL> newExpression . transformChildrenVoid ( this ) <EOL> return newExpression <EOL> } <EOL> } ) <EOL> }


fun applyConfiguration ( project : Project , target : AbstractKotlinTarget , shouldRewritePoms : Provider < Boolean > )


fun getInstance ( ) : MavenPluginConfigurator


override fun getInstance ( ) : MavenPluginConfigurator

= object : MavenPluginConfigurator { <EOL> override fun applyConfiguration ( project : Project , target : AbstractKotlinTarget , shouldRewritePoms : Provider < Boolean > ) = Unit <EOL> }


override fun accept ( visitor : PsiElementVisitor )

{ <EOL> if ( visitor is JavaElementVisitor ) { <EOL> visitor . visitTypeParameterList ( this ) <EOL> } else { <EOL> visitor . visitElement ( this ) <EOL> } <EOL> }


override fun processDeclarations ( processor : PsiScopeProcessor , state : ResolveState , lastParent : PsiElement ? , place : PsiElement ) : Boolean

= typeParameters . all { processor . execute ( it , state ) }


override fun getTypeParameters ( ) : Array < PsiTypeParameter >

= _typeParameters . toArrayIfNotEmptyOrDefault ( PsiTypeParameter . EMPTY_ARRAY )


override fun getTypeParameterIndex ( typeParameter : PsiTypeParameter ? ) : Int

= _typeParameters . indexOf ( typeParameter )


= "<STR_LIT>"


override fun equals ( other : Any ? ) : Boolean

{ <EOL> if ( this === other ) return true <EOL> if ( other !is SymbolLightTypeParameterList || other . ktModule != ktModule ) return false <EOL> if ( ktDeclaration != null || other . ktDeclaration != null ) { <EOL> return other . ktDeclaration == ktDeclaration <EOL> } <EOL> return other . owner == owner && compareSymbolPointers ( symbolWithTypeParameterPointer , other . symbolWithTypeParameterPointer ) <EOL> }


= ktDeclaration . hashCode ( ) + <NUM_LIT:1>


override fun isEquivalentTo ( another : PsiElement ? ) : Boolean

= basicIsEquivalentTo ( this , another )


= owner


override fun getContainingFile ( ) : PsiFile

= parent . containingFile


= ktDeclaration ? . typeParameterList ? . text


= ktDeclaration ? . typeParameterList ? . textOffset ? : - <NUM_LIT:1>


override fun getStartOffsetInParent ( ) : Int

= ktDeclaration ? . typeParameterList ? . startOffsetInParent ? : - <NUM_LIT:1>


@ OnlyDescriptors <EOL> @ Test <EOL> fun `check if enum values are correctly linked` ( )

{ <EOL> val writerPlugin = TestOutputWriterPlugin ( ) <EOL> val testDataDir = getTestDataDir ( "<STR_LIT>" ) . toAbsolutePath ( ) <EOL> testFromData ( dokkaConfiguration { <EOL> sourceSets { <EOL> sourceSet { <EOL> sourceRoots = listOf ( Paths . get ( "<STR_LIT>" ) . toString ( ) ) <EOL> analysisPlatform = "<STR_LIT:jvm>" <EOL> name = "<STR_LIT:jvm>" <EOL> } <EOL> } <EOL> } , pluginOverrides = listOf ( writerPlugin ) ) { <EOL> documentablesTransformationStage = { <EOL> val classlikes = it . packages . single ( ) . children <EOL> assertEquals ( <NUM_LIT:4> , classlikes . size ) <EOL> val javaLinker = classlikes . single { it . name == "<STR_LIT>" } <EOL> javaLinker . documentation . values . single ( ) . children . run { <EOL> when ( val kotlinLink = this [ <NUM_LIT:0> ] . children [ <NUM_LIT:1> ] . children [ <NUM_LIT:1> ] ) { <EOL> is DocumentationLink -> kotlinLink . dri . run { <EOL> assertEquals ( "<STR_LIT>" , this . classNames ) <EOL> assertEquals ( null , this . callable ) <EOL> assertNotNull ( DRIExtraContainer ( extra ) [ EnumEntryDRIExtra ] ) <EOL> } <EOL> else -> throw AssertionError ( "<STR_LIT>" ) <EOL> } <EOL> when ( val javaLink = this [ <NUM_LIT:0> ] . children [ <NUM_LIT:2> ] . children [ <NUM_LIT:1> ] ) { <EOL> is DocumentationLink -> javaLink . dri . run { <EOL> assertEquals ( "<STR_LIT>" , this . classNames ) <EOL> assertEquals ( null , this . callable ) <EOL> assertNotNull ( DRIExtraContainer ( extra ) [ EnumEntryDRIExtra ] ) <EOL> } <EOL> else -> throw AssertionError ( "<STR_LIT>" ) <EOL> } <EOL> } <EOL> val kotlinLinker = classlikes . single { it . name == "<STR_LIT>" } <EOL> kotlinLinker . documentation . values . single ( ) . children . run { <EOL> when ( val kotlinLink = this [ <NUM_LIT:0> ] . children [ <NUM_LIT:0> ] . children [ <NUM_LIT:5> ] ) { <EOL> is DocumentationLink -> kotlinLink . dri . run { <EOL> assertEquals ( "<STR_LIT>" , this . classNames ) <EOL> assertEquals ( null , this . callable ) <EOL> assertNotNull ( DRIExtraContainer ( extra ) [ EnumEntryDRIExtra ] ) <EOL> } <EOL> else -> throw AssertionError ( "<STR_LIT>" ) <EOL> } <EOL> when ( val javaLink = this [ <NUM_LIT:0> ] . children [ <NUM_LIT:0> ] . children [ <NUM_LIT:9> ] ) { <EOL> is DocumentationLink -> javaLink . dri . run { <EOL> assertEquals ( "<STR_LIT>" , this . classNames ) <EOL> assertEquals ( null , this . callable ) <EOL> assertNotNull ( DRIExtraContainer ( extra ) [ EnumEntryDRIExtra ] ) <EOL> } <EOL> else -> throw AssertionError ( "<STR_LIT>" ) <EOL> } <EOL> } <EOL> assertEquals ( javaLinker . documentation . values . single ( ) . children [ <NUM_LIT:0> ] . children [ <NUM_LIT:1> ] . children [ <NUM_LIT:1> ] . let { it as? DocumentationLink } ? . dri , kotlinLinker . documentation . values . single ( ) . children [ <NUM_LIT:0> ] . children [ <NUM_LIT:0> ] . children [ <NUM_LIT:5> ] . let { it as? DocumentationLink } ? . dri ) <EOL> assertEquals ( javaLinker . documentation . values . single ( ) . children [ <NUM_LIT:0> ] . children [ <NUM_LIT:2> ] . children [ <NUM_LIT:1> ] . let { it as? DocumentationLink } ? . dri , kotlinLinker . documentation . values . single ( ) . children [ <NUM_LIT:0> ] . children [ <NUM_LIT:0> ] . children [ <NUM_LIT:9> ] . let { it as? DocumentationLink } ? . dri ) <EOL> } <EOL> renderingStage = { rootPageNode , _ -> <EOL> val classlikes = rootPageNode . children . single ( ) . children <EOL> assertEquals ( <NUM_LIT:4> , classlikes . size ) <EOL> val javaLinker = classlikes . single { it . name == "<STR_LIT>" } <EOL> ( javaLinker as ContentPage ) . run { <EOL> assertNotNull ( content . dfs { it is ContentDRILink && it . address . classNames == "<STR_LIT>" } ) <EOL> assertNotNull ( content . dfs { it is ContentDRILink && it . address . classNames == "<STR_LIT>" } ) <EOL> } <EOL> val kotlinLinker = classlikes . single { it . name == "<STR_LIT>" } <EOL> ( kotlinLinker as ContentPage ) . run { <EOL> assertNotNull ( content . dfs { it is ContentDRILink && it . address . classNames == "<STR_LIT>" } ) <EOL> assertNotNull ( content . dfs { it is ContentDRILink && it . address . classNames == "<STR_LIT>" } ) <EOL> } <EOL> Jsoup <EOL> . parse ( writerPlugin . writer . contents . getValue ( "<STR_LIT>" ) ) <EOL> . select ( "<STR_LIT>" ) <EOL> . assertOnlyOneElement ( ) <EOL> Jsoup <EOL> . parse ( writerPlugin . writer . contents . getValue ( "<STR_LIT>" ) ) <EOL> . select ( "<STR_LIT>" ) <EOL> . assertOnlyOneElement ( ) <EOL> Jsoup <EOL> . parse ( writerPlugin . writer . contents . getValue ( "<STR_LIT>" ) ) <EOL> . select ( "<STR_LIT>" ) <EOL> . assertOnlyOneElement ( ) <EOL> Jsoup <EOL> . parse ( writerPlugin . writer . contents . getValue ( "<STR_LIT>" ) ) <EOL> . select ( "<STR_LIT>" ) <EOL> . assertOnlyOneElement ( ) <EOL> } <EOL> } <EOL> }


private fun < T > List < T > . assertOnlyOneElement ( )

{ <EOL> if ( isEmpty ( ) || size > <NUM_LIT:1> ) { <EOL> throw AssertionError ( "<STR_LIT>" ) <EOL> } <EOL> }


{ <EOL> val outerBuildee = build outerBuild @ { <EOL> class LocalClass { <EOL> fun localClassMember ( ) { <EOL> val innerBuildee = build innerBuild @ { <EOL> this@outerBuild . setTypeVariable ( TargetType ( ) ) <EOL> this@innerBuild . setTypeVariable ( TargetType ( ) ) <EOL> } <EOL> checkExactType < Buildee < TargetType > > ( innerBuildee ) <EOL> } <EOL> } <EOL> } <EOL> checkExactType < Buildee < TargetType > > ( outerBuildee ) <EOL> }


{ storage = value }


fun < PTV > build ( instructions : Buildee < PTV > . ( ) -> Unit ) : Buildee < PTV >

{ <EOL> return Buildee < PTV > ( ) . apply ( instructions ) <EOL> }


fun < T : Any > create ( x : T ) : Derived < T >

= Derived ( x )


fun Int . foo ( a : Int = <NUM_LIT:1> , b : Int = <NUM_LIT:2> , c : Int = <NUM_LIT:3> , d : Int = <NUM_LIT:4> , e : Int = <NUM_LIT:5> , f : Int = <NUM_LIT:6> , g : Int = <NUM_LIT:7> , h : Int = <NUM_LIT:8> , i : Int = <NUM_LIT:9> , j : Int = <NUM_LIT:10> , k : Int = <NUM_LIT:11> , l : Int = <NUM_LIT:12> , m : Int = <NUM_LIT> , n : Int = <NUM_LIT> , o : Int = <NUM_LIT> , p : Int = <NUM_LIT:16> , q : Int = <NUM_LIT> , r : Int = <NUM_LIT> , s : Int = <NUM_LIT> , t : Int = <NUM_LIT:20> , u : Int = <NUM_LIT> , v : Int = <NUM_LIT> , w : Int = <NUM_LIT:23> , x : Int = <NUM_LIT> , y : Int = <NUM_LIT> , z : Int = <NUM_LIT> , aa : Int = <NUM_LIT> , bb : Int = <NUM_LIT> , cc : Int = <NUM_LIT> , dd : Int = <NUM_LIT> , ee : Int = <NUM_LIT:31> , ff : Int = <NUM_LIT> ) : String

{ <EOL> return "<STR_LIT>" <EOL> }


fun String . bar ( a : Int = <NUM_LIT:1> , b : Int = <NUM_LIT:2> , c : Int = <NUM_LIT:3> , d : Int = <NUM_LIT:4> , e : Int = <NUM_LIT:5> , f : Int = <NUM_LIT:6> , g : Int = <NUM_LIT:7> , h : Int = <NUM_LIT:8> , i : Int = <NUM_LIT:9> , j : Int = <NUM_LIT:10> , k : Int = <NUM_LIT:11> , l : Int = <NUM_LIT:12> , m : Int = <NUM_LIT> , n : Int = <NUM_LIT> , o : Int = <NUM_LIT> , p : Int = <NUM_LIT:16> , q : Int = <NUM_LIT> , r : Int = <NUM_LIT> , s : Int = <NUM_LIT> , t : Int = <NUM_LIT:20> , u : Int = <NUM_LIT> , v : Int = <NUM_LIT> , w : Int = <NUM_LIT:23> , x : Int = <NUM_LIT> , y : Int = <NUM_LIT> , z : Int = <NUM_LIT> , aa : Int = <NUM_LIT> , bb : Int = <NUM_LIT> , cc : Int = <NUM_LIT> , dd : Int = <NUM_LIT> , ee : Int = <NUM_LIT:31> , ff : Int = <NUM_LIT> , gg : Int = <NUM_LIT> , hh : Int = <NUM_LIT> , ii : Int = <NUM_LIT> , jj : Int = <NUM_LIT> , kk : Int = <NUM_LIT> , ll : Int = <NUM_LIT> , mm : Int = <NUM_LIT> , nn : Int = <NUM_LIT> ) : String

{ <EOL> return "<STR_LIT>" + <EOL> "<STR_LIT>" <EOL> }


fun Char . baz ( a : Int = <NUM_LIT:1> , b : Int = <NUM_LIT:2> , c : Int = <NUM_LIT:3> , d : Int = <NUM_LIT:4> , e : Int = <NUM_LIT:5> , f : Int = <NUM_LIT:6> , g : Int = <NUM_LIT:7> , h : Int = <NUM_LIT:8> , i : Int = <NUM_LIT:9> , j : Int = <NUM_LIT:10> , k : Int = <NUM_LIT:11> , l : Int = <NUM_LIT:12> , m : Int = <NUM_LIT> , n : Int = <NUM_LIT> , o : Int = <NUM_LIT> , p : Int = <NUM_LIT:16> , q : Int = <NUM_LIT> , r : Int = <NUM_LIT> , s : Int = <NUM_LIT> , t : Int = <NUM_LIT:20> , u : Int = <NUM_LIT> , v : Int = <NUM_LIT> , w : Int = <NUM_LIT:23> , x : Int = <NUM_LIT> , y : Int = <NUM_LIT> , z : Int = <NUM_LIT> , aa : Int = <NUM_LIT> , bb : Int = <NUM_LIT> , cc : Int = <NUM_LIT> , dd : Int = <NUM_LIT> , ee : Int = <NUM_LIT:31> , ff : Int = <NUM_LIT> , gg : Int = <NUM_LIT> , hh : Int = <NUM_LIT> , ii : Int = <NUM_LIT> , jj : Int = <NUM_LIT> , kk : Int = <NUM_LIT> , ll : Int = <NUM_LIT> , mm : Int = <NUM_LIT> , nn : Int = <NUM_LIT> , oo : Int = <NUM_LIT> , pp : Int = <NUM_LIT:42> , qq : Int = <NUM_LIT> , rr : Int = <NUM_LIT> , ss : Int = <NUM_LIT> , tt : Int = <NUM_LIT> , uu : Int = <NUM_LIT> , vv : Int = <NUM_LIT> , ww : Int = <NUM_LIT> , xx : Int = <NUM_LIT> , yy : Int = <NUM_LIT> , zz : Int = <NUM_LIT> , aaa : Int = <NUM_LIT> , bbb : Int = <NUM_LIT> , ccc : Int = <NUM_LIT> , ddd : Int = <NUM_LIT> , eee : Int = <NUM_LIT> , fff : Int = <NUM_LIT> , ggg : Int = <NUM_LIT> , hhh : Int = <NUM_LIT> , iii : Int = <NUM_LIT> , jjj : Int = <NUM_LIT> , kkk : Int = <NUM_LIT> , lll : Int = <NUM_LIT> , mmm : Int = <NUM_LIT> , nnn : Int = <NUM_LIT> , ooo : Int = <NUM_LIT> , ppp : Int = <NUM_LIT> , qqq : Int = <NUM_LIT> , rrr : Int = <NUM_LIT> ) : String

{ <EOL> return "<STR_LIT>" + <EOL> "<STR_LIT>" + <EOL> "<STR_LIT>" <EOL> }


{ <EOL> val test1 = <NUM_LIT:1> . foo ( <NUM_LIT:4> , e = <NUM_LIT:8> , f = <NUM_LIT> , w = <NUM_LIT:16> , aa = <NUM_LIT:23> , ff = <NUM_LIT:42> ) <EOL> val test2 = <NUM_LIT:1> . foo ( ) <EOL> val test3 = <NUM_LIT:1> . foo ( <NUM_LIT> , <NUM_LIT:31> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:23> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:20> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , q = <NUM_LIT:16> , r = <NUM_LIT> , s = <NUM_LIT> , t = <NUM_LIT> , u = <NUM_LIT:12> , v = <NUM_LIT:11> , w = <NUM_LIT:10> , x = <NUM_LIT:9> , y = <NUM_LIT:8> , z = <NUM_LIT:7> , aa = <NUM_LIT:6> , bb = <NUM_LIT:5> , cc = <NUM_LIT:4> , dd = <NUM_LIT:3> , ee = <NUM_LIT:2> , ff = <NUM_LIT:1> ) <EOL> if ( test1 != "<STR_LIT>" ) { <EOL> return "<STR_LIT>" <EOL> } <EOL> if ( test2 != "<STR_LIT>" ) { <EOL> return "<STR_LIT>" <EOL> } <EOL> if ( test3 != "<STR_LIT>" ) { <EOL> return "<STR_LIT>" <EOL> } <EOL> val test4 = "<STR_LIT>" . bar ( <NUM_LIT> , <NUM_LIT> , h = <NUM_LIT> , l = <NUM_LIT> , q = <NUM_LIT> , u = <NUM_LIT:8> , aa = <NUM_LIT> , ff = <NUM_LIT> , jj = <NUM_LIT> , mm = <NUM_LIT> ) <EOL> val test5 = "<STR_LIT>" . bar ( ) <EOL> val test6 = "<STR_LIT>" . bar ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:31> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:23> , <NUM_LIT> , <NUM_LIT> , u = <NUM_LIT:20> , v = <NUM_LIT> , w = <NUM_LIT> , x = <NUM_LIT> , y = <NUM_LIT:16> , z = <NUM_LIT> , aa = <NUM_LIT> , bb = <NUM_LIT> , cc = <NUM_LIT:12> , dd = <NUM_LIT:11> , ee = <NUM_LIT:10> , ff = <NUM_LIT:9> , gg = <NUM_LIT:8> , hh = <NUM_LIT:7> , ii = <NUM_LIT:6> , jj = <NUM_LIT:5> , kk = <NUM_LIT:4> , ll = <NUM_LIT:3> , mm = <NUM_LIT:2> , nn = <NUM_LIT:1> ) <EOL> if ( test4 != "<STR_LIT>" ) { <EOL> return "<STR_LIT>" <EOL> } <EOL> if ( test5 != "<STR_LIT>" ) { <EOL> return "<STR_LIT>" <EOL> } <EOL> if ( test6 != "<STR_LIT>" ) { <EOL> return "<STR_LIT>" <EOL> } <EOL> val test7 = '<CHAR_LIT:a>' . baz ( <NUM_LIT:5> , f = <NUM_LIT:3> , w = <NUM_LIT:1> , aa = <NUM_LIT> , nn = <NUM_LIT:2> , qq = <NUM_LIT> , ww = <NUM_LIT> , aaa = <NUM_LIT> , iii = <NUM_LIT:3> , nnn = <NUM_LIT:8> , rrr = <NUM_LIT:7> ) <EOL> val test8 = '<CHAR_LIT:a>' . baz ( ) <EOL> val test9 = '<CHAR_LIT:a>' . baz ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:42> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , jj = <NUM_LIT> , kk = <NUM_LIT> , ll = <NUM_LIT> , mm = <NUM_LIT> , nn = <NUM_LIT:31> , oo = <NUM_LIT> , pp = <NUM_LIT> , qq = <NUM_LIT> , rr = <NUM_LIT> , ss = <NUM_LIT> , tt = <NUM_LIT> , uu = <NUM_LIT> , vv = <NUM_LIT:23> , ww = <NUM_LIT> , xx = <NUM_LIT> , yy = <NUM_LIT:20> , zz = <NUM_LIT> , aaa = <NUM_LIT> , bbb = <NUM_LIT> , ccc = <NUM_LIT:16> , ddd = <NUM_LIT> , eee = <NUM_LIT> , fff = <NUM_LIT> , ggg = <NUM_LIT:12> , hhh = <NUM_LIT:11> , iii = <NUM_LIT:10> , jjj = <NUM_LIT:9> , kkk = <NUM_LIT:8> , lll = <NUM_LIT:7> , mmm = <NUM_LIT:6> , nnn = <NUM_LIT:5> , ooo = <NUM_LIT:4> , ppp = <NUM_LIT:3> , qqq = <NUM_LIT:2> , rrr = <NUM_LIT:1> ) <EOL> if ( test7 != "<STR_LIT>" + "<STR_LIT>" ) { <EOL> return "<STR_LIT>" <EOL> } <EOL> if ( test8 != "<STR_LIT>" + "<STR_LIT>" ) { <EOL> return "<STR_LIT>" <EOL> } <EOL> if ( test9 != "<STR_LIT>" + "<STR_LIT>" ) { <EOL> return "<STR_LIT>" <EOL> } <EOL> return "<STR_LIT:OK>" <EOL> }


actual fun Modifier . notchPadding ( ) : Modifier

= Modifier . padding ( top = <NUM_LIT:12> . dp )


fun < K , T > foo ( x : ( K ) -> T ) : Pair < K , T >

= ( <NUM_LIT:1> as K ) to ( <NUM_LIT> as T )


{ <EOL> val x = foo < Int , _ > { it . toFloat ( ) } <EOL> return "<STR_LIT:OK>" <EOL> }


override fun check ( declaration : FirClass , context : CheckerContext , reporter : DiagnosticReporter )

{ <EOL> val session = context . session <EOL> fun checkCanGenerateFunctionImp ( setter : FirPropertyAccessor ) { <EOL> if ( setter . valueParameters . size > <NUM_LIT:2> ) <EOL> reporter . reportOn ( setter . source , FirNativeErrors . TWO_OR_LESS_PARAMETERS_ARE_SUPPORTED_HERE , context ) <EOL> } <EOL> fun checkCanGenerateOutletSetterImp ( property : FirProperty ) { <EOL> if ( ! property . isVar ) { <EOL> reporter . reportOn ( property . source , FirNativeErrors . PROPERTY_MUST_BE_VAR , objCOutletClassId . asSingleFqName ( ) , context ) <EOL> return <EOL> } <EOL> property . receiverParameter ? . let { <EOL> reporter . reportOn ( it . source , FirNativeErrors . MUST_NOT_HAVE_EXTENSION_RECEIVER , "<STR_LIT>" , context ) <EOL> } <EOL> val type = property . returnTypeRef <EOL> if ( ! type . isObjCObjectType ( session ) ) <EOL> reporter . reportOn ( property . returnTypeRef . source , FirNativeErrors . MUST_BE_OBJC_OBJECT_TYPE , "<STR_LIT>" , type . coneType , context ) <EOL> checkCanGenerateFunctionImp ( property . setter ! ! ) <EOL> } <EOL> fun checkKotlinObjCClass ( firClass : FirClass ) { <EOL> for ( decl in firClass . declarations ) { <EOL> if ( decl is FirProperty && decl . annotations . hasAnnotation ( objCOutletClassId , session ) ) <EOL> checkCanGenerateOutletSetterImp ( decl ) <EOL> } <EOL> } <EOL> if ( ! declaration . isExpect && declaration . symbol . isKotlinObjCClass ( context . session ) ) { <EOL> checkKotlinObjCClass ( declaration ) <EOL> } <EOL> }


{ <EOL> super . hash ( ) <EOL> }


@ OptIn ( DokkaPluginApiPreview :: class ) <EOL> override fun pluginApiPreviewAcknowledgement ( ) : PluginApiPreviewAcknowledgement

= PluginApiPreviewAcknowledgement


= sourceDescription


suspend fun massiveRun ( action : suspend ( ) -> Unit )

{ <EOL> val n = <NUM_LIT:100> <EOL> val k = <NUM_LIT> <EOL> val time = measureTimeMillis { <EOL> coroutineScope { <EOL> repeat ( n ) { <EOL> launch { <EOL> repeat ( k ) { action ( ) } <EOL> } <EOL> } <EOL> } <EOL> } <EOL> println ( "<STR_LIT>" ) <EOL> }


= runBlocking { <EOL> withContext ( Dispatchers . Default ) { <EOL> massiveRun { <EOL> counter . incrementAndGet ( ) <EOL> } <EOL> } <EOL> println ( "<STR_LIT>" ) <EOL> }


abstract fun < T > foo ( list : List < T > ) where T : Number , T : Comparable < T >


override fun < T > foo ( list : List < T > ) where T : Number , T : Comparable < T >

{ <EOL> }


private fun FirBasedSymbol < * > . isCollectable ( ) : Boolean

{ <EOL> if ( this is FirCallableSymbol < * > ) { <EOL> if ( resolvedContextReceivers . any { it . typeRef . coneType . hasError ( ) } ) return false <EOL> if ( typeParameterSymbols . any { it . toConeType ( ) . hasError ( ) } ) return false <EOL> if ( receiverParameter ? . typeRef ? . coneType ? . hasError ( ) == true ) return false <EOL> if ( this is FirFunctionSymbol < * > && valueParameterSymbols . any { it . resolvedReturnType . hasError ( ) } ) return false <EOL> @ OptIn ( SymbolInternals :: class ) <EOL> if ( fir . isHiddenToOvercomeSignatureClash == true ) return false <EOL> } <EOL> return when ( this ) { <EOL> is FirNamedFunctionSymbol -> isCollectableAccordingToSource && name != SpecialNames . NO_NAME_PROVIDED <EOL> is FirRegularClassSymbol -> name != SpecialNames . NO_NAME_PROVIDED <EOL> is FirPropertySymbol -> source ? . kind !is KtFakeSourceElementKind . EnumGeneratedDeclaration <EOL> is FirFieldSymbol -> source ? . kind != KtFakeSourceElementKind . ClassDelegationField <EOL> else -> true <EOL> } <EOL> }


internal fun isExpectAndNonExpect ( first : FirBasedSymbol < * > , second : FirBasedSymbol < * > ) : Boolean

{ <EOL> val firstIsExpect = first . resolvedStatus ? . isExpect == true <EOL> val secondIsExpect = second . resolvedStatus ? . isExpect == true <EOL> return firstIsExpect xor secondIsExpect <EOL> }


private fun groupTopLevelByName ( declarations : List < FirDeclaration > , context : CheckerContext ) : Map < Name , DeclarationBuckets >

{ <EOL> val groups = mutableMapOf < Name , DeclarationBuckets > ( ) <EOL> for ( declaration in declarations ) { <EOL> if ( ! declaration . symbol . isCollectable ( ) ) continue <EOL> when ( declaration ) { <EOL> is FirSimpleFunction -> <EOL> groups . getOrPut ( declaration . name , :: DeclarationBuckets ) . simpleFunctions += <EOL> declaration . symbol to FirRedeclarationPresenter . represent ( declaration . symbol ) <EOL> is FirProperty -> { <EOL> val group = groups . getOrPut ( declaration . name , :: DeclarationBuckets ) <EOL> val representation = FirRedeclarationPresenter . represent ( declaration . symbol ) <EOL> if ( declaration . receiverParameter != null ) { <EOL> group . extensionProperties += declaration . symbol to representation <EOL> } else { <EOL> group . properties += declaration . symbol to representation <EOL> } <EOL> } <EOL> is FirClassLikeDeclaration -> { <EOL> val representation = FirRedeclarationPresenter . represent ( declaration . symbol ) ? : continue <EOL> val group = groups . getOrPut ( declaration . nameOrSpecialName , :: DeclarationBuckets ) <EOL> group . classLikes += declaration . symbol to representation <EOL> declaration . symbol . expandedClassWithConstructorsScope ( context ) ? . let { ( expandedClass , scopeWithConstructors ) -> <EOL> if ( expandedClass . classKind == ClassKind . OBJECT ) { <EOL> return@let <EOL> } <EOL> scopeWithConstructors . processDeclaredConstructors { <EOL> group . constructors += it to FirRedeclarationPresenter . represent ( it , declaration . symbol ) <EOL> } <EOL> } <EOL> } <EOL> else -> { } <EOL> } <EOL> } <EOL> return groups <EOL> }


fun FirDeclarationCollector < FirBasedSymbol < * > > . collectClassMembers ( klass : FirRegularClassSymbol )

{ <EOL> val otherDeclarations = mutableMapOf < String , MutableSet < FirBasedSymbol < * > > > ( ) <EOL> val functionDeclarations = mutableMapOf < String , MutableSet < FirFunctionSymbol < * > > > ( ) <EOL> val declaredMemberScope = klass . declaredMemberScope ( context ) <EOL> val unsubstitutedScope = klass . unsubstitutedScope ( context ) <EOL> declaredMemberScope . processAllFunctions { declaredFunction -> <EOL> if ( ! declaredFunction . isCollectable ( ) ) { <EOL> return@processAllFunctions <EOL> } <EOL> collect ( declaredFunction , FirRedeclarationPresenter . represent ( declaredFunction ) , functionDeclarations ) <EOL> unsubstitutedScope . processFunctionsByName ( declaredFunction . name ) { anotherFunction -> <EOL> if ( anotherFunction != declaredFunction && anotherFunction . isCollectable ( ) && anotherFunction . isVisibleInClass ( klass ) ) { <EOL> collect ( anotherFunction , FirRedeclarationPresenter . represent ( anotherFunction ) , functionDeclarations ) <EOL> } <EOL> } <EOL> } <EOL> if ( context . isTopLevel ) { <EOL> unsubstitutedScope . processDeclaredConstructors { <EOL> if ( it . isCollectable ( ) && it . isVisibleInClass ( klass ) ) { <EOL> collect ( it , FirRedeclarationPresenter . represent ( it , klass ) , functionDeclarations ) <EOL> } <EOL> } <EOL> } <EOL> declaredMemberScope . processAllProperties { declaredProperty -> <EOL> if ( ! declaredProperty . isCollectable ( ) ) { <EOL> return@processAllProperties <EOL> } <EOL> collect ( declaredProperty , FirRedeclarationPresenter . represent ( declaredProperty ) , otherDeclarations ) <EOL> unsubstitutedScope . processPropertiesByName ( declaredProperty . name ) { anotherProperty -> <EOL> if ( anotherProperty != declaredProperty && anotherProperty . isCollectable ( ) && anotherProperty . isVisibleInClass ( klass ) ) { <EOL> collect ( anotherProperty , FirRedeclarationPresenter . represent ( anotherProperty ) , otherDeclarations ) <EOL> } <EOL> } <EOL> } <EOL> fun processClassifier ( it : FirClassifierSymbol < * > ) { <EOL> when { <EOL> ! it . isCollectable ( ) || ! it . isVisibleInClass ( klass ) -> return <EOL> it is FirRegularClassSymbol -> collect ( it , FirRedeclarationPresenter . represent ( it ) , otherDeclarations ) <EOL> it is FirTypeAliasSymbol -> collect ( it , FirRedeclarationPresenter . represent ( it ) , otherDeclarations ) <EOL> else -> { } <EOL> } <EOL> if ( it !is FirClassLikeSymbol < * > ) { <EOL> return <EOL> } <EOL> it . expandedClassWithConstructorsScope ( context ) ? . let { ( expandedClass , scopeWithConstructors ) -> <EOL> if ( expandedClass . classKind == ClassKind . OBJECT ) { <EOL> return@let <EOL> } <EOL> scopeWithConstructors . processDeclaredConstructors { constructor -> <EOL> collect ( constructor , FirRedeclarationPresenter . represent ( constructor , it ) , functionDeclarations ) <EOL> } <EOL> } <EOL> } <EOL> for ( declaredClassifier in klass . declarationSymbols ) { <EOL> if ( declaredClassifier is FirClassifierSymbol < * > ) { <EOL> processClassifier ( declaredClassifier ) <EOL> unsubstitutedScope . processClassifiersByName ( declaredClassifier . name ) { anotherClassifier -> <EOL> if ( anotherClassifier != declaredClassifier ) { <EOL> processClassifier ( anotherClassifier ) <EOL> } <EOL> } <EOL> } <EOL> } <EOL> }


fun collectConflictingLocalFunctionsFrom ( block : FirBlock , context : CheckerContext ) : Map < FirFunctionSymbol < * > , Set < FirBasedSymbol < * > > >

{ <EOL> val collectables = <EOL> block . statements . filter { <EOL> ( it is FirSimpleFunction || it is FirRegularClass ) && ( it as FirDeclaration ) . symbol . isCollectable ( ) <EOL> } <EOL> if ( collectables . isEmpty ( ) ) return emptyMap ( ) <EOL> val inspector = FirDeclarationCollector < FirFunctionSymbol < * > > ( context ) <EOL> val functionDeclarations = mutableMapOf < String , MutableSet < FirFunctionSymbol < * > > > ( ) <EOL> for ( collectable in collectables ) { <EOL> when ( collectable ) { <EOL> is FirSimpleFunction -> <EOL> inspector . collect ( collectable . symbol , FirRedeclarationPresenter . represent ( collectable . symbol ) , functionDeclarations ) <EOL> is FirClassLikeDeclaration -> { <EOL> collectable . symbol . expandedClassWithConstructorsScope ( context ) ? . let { ( _ , scopeWithConstructors ) -> <EOL> scopeWithConstructors . processDeclaredConstructors { <EOL> inspector . collect ( it , FirRedeclarationPresenter . represent ( it , collectable . symbol ) , functionDeclarations ) <EOL> } <EOL> } <EOL> } <EOL> else -> { } <EOL> } <EOL> } <EOL> return inspector . declarationConflictingSymbols <EOL> }


private fun < D : FirBasedSymbol < * > , S : D > FirDeclarationCollector < D > . collect ( declaration : S , representation : String , map : MutableMap < String , MutableSet < S > > , )

{ <EOL> map . getOrPut ( representation , :: mutableSetOf ) . also { <EOL> if ( ! it . add ( declaration ) ) { <EOL> return@also <EOL> } <EOL> val conflicts = SmartSet . create < FirBasedSymbol < * > > ( ) <EOL> for ( otherDeclaration in it ) { <EOL> if ( otherDeclaration != declaration && ! areNonConflictingCallables ( declaration , otherDeclaration ) ) { <EOL> conflicts . add ( otherDeclaration ) <EOL> declarationConflictingSymbols . getOrPut ( otherDeclaration ) { SmartSet . create ( ) } . add ( declaration ) <EOL> } <EOL> } <EOL> declarationConflictingSymbols [ declaration ] = conflicts <EOL> } <EOL> }


@ Suppress ( "<STR_LIT>" ) <EOL> fun FirDeclarationCollector < FirBasedSymbol < * > > . collectTopLevel ( file : FirFile , packageMemberScope : FirPackageMemberScope )

{ <EOL> for ( ( declarationName , group ) in groupTopLevelByName ( file . declarations , context ) ) { <EOL> val groupHasClassLikesOrProperties = group . classLikes . isNotEmpty ( ) || group . properties . isNotEmpty ( ) <EOL> val groupHasSimpleFunctions = group . simpleFunctions . isNotEmpty ( ) <EOL> fun collect ( declarations : List < Pair < FirBasedSymbol < * > , String > > , conflictingSymbol : FirBasedSymbol < * > , conflictingPresentation : String ? = null , conflictingFile : FirFile ? = null , ) { <EOL> for ( ( declaration , declarationPresentation ) in declarations ) { <EOL> collectTopLevelConflict ( declaration , declarationPresentation , file , conflictingSymbol , conflictingPresentation , conflictingFile ) <EOL> session . lookupTracker ? . recordNameLookup ( declarationName , file . packageFqName . asString ( ) , declaration . source , file . source ) <EOL> } <EOL> } <EOL> fun collectFromClassifierSource ( conflictingSymbol : FirClassifierSymbol < * > , conflictingPresentation : String ? = null , conflictingFile : FirFile ? = null , ) { <EOL> collect ( group . classLikes , conflictingSymbol , conflictingPresentation , conflictingFile ) <EOL> collect ( group . properties , conflictingSymbol , conflictingPresentation , conflictingFile ) <EOL> if ( groupHasSimpleFunctions ) { <EOL> if ( conflictingSymbol !is FirClassLikeSymbol < * > ) { <EOL> return <EOL> } <EOL> conflictingSymbol . expandedClassWithConstructorsScope ( context ) ? . let { ( expandedClass , scopeWithConstructors ) -> <EOL> if ( expandedClass . classKind == ClassKind . OBJECT || expandedClass . classKind == ClassKind . ENUM_ENTRY ) { <EOL> return <EOL> } <EOL> scopeWithConstructors . processDeclaredConstructors { constructor -> <EOL> val ctorRepresentation = FirRedeclarationPresenter . represent ( constructor , conflictingSymbol ) <EOL> collect ( group . simpleFunctions , conflictingSymbol = constructor , conflictingPresentation = ctorRepresentation ) <EOL> } <EOL> } <EOL> } <EOL> } <EOL> if ( groupHasSimpleFunctions || group . constructors . isNotEmpty ( ) ) { <EOL> packageMemberScope . processFunctionsByName ( declarationName ) { <EOL> collect ( group . simpleFunctions , it ) <EOL> collect ( group . constructors , it ) <EOL> } <EOL> } <EOL> if ( groupHasClassLikesOrProperties || groupHasSimpleFunctions ) { <EOL> packageMemberScope . processClassifiersByNameWithSubstitution ( declarationName ) { symbol , _ -> <EOL> collectFromClassifierSource ( conflictingSymbol = symbol ) <EOL> } <EOL> session . nameConflictsTracker ? . let { it as? FirNameConflictsTracker } <EOL> ? . redeclaredClassifiers ? . get ( ClassId ( file . packageFqName , declarationName ) ) ? . forEach { <EOL> collectFromClassifierSource ( conflictingSymbol = it . classifier , conflictingFile = it . file ) <EOL> } <EOL> for ( ( classLike , representation ) in group . classLikes ) { <EOL> collectFromClassifierSource ( classLike , conflictingPresentation = representation , conflictingFile = file ) <EOL> } <EOL> } <EOL> if ( groupHasClassLikesOrProperties || group . extensionProperties . isNotEmpty ( ) ) { <EOL> packageMemberScope . processPropertiesByName ( declarationName ) { <EOL> collect ( group . classLikes , conflictingSymbol = it ) <EOL> collect ( group . properties , conflictingSymbol = it ) <EOL> collect ( group . extensionProperties , conflictingSymbol = it ) <EOL> } <EOL> } <EOL> } <EOL> }

/**
 * To check top-level declarations for redeclarations, we check multiple sources (the packageMemberScope's properties, functions
 * and classifiers), redeclared classifiers from session.nameConflictsTracker and the file's declarations themselves.
 * To prevent inspecting the same source multiple times, we group the declarations in the file by name and subdivide them into
 * buckets (the properties of DeclarationGroup).
 *
 * Depending on the presence of declarations in the buckets, some checks can be omitted.
 * E.g., if there are no functions and no classes with constructors in the file, we don't need to inspect functions.
 *
 * #### Matrix of possible conflicts between "sources" and "buckets"
 *
 * | | simpleFunctions | constructors | classLikes | Properties | extensionProperties |
 * |-------------------------|-----------------|--------------|------------|------------|---------------------|
 * | functions | X | X | | | |
 * | classifiers | | | X | X | |
 * | constructors of classes | X | | | | |
 * | properties | | | X | X | X |
 */


private fun FirClassLikeSymbol < * > . expandedClassWithConstructorsScope ( context : CheckerContext ) : Pair < FirRegularClassSymbol , FirScope > ?

{ <EOL> return when ( this ) { <EOL> is FirRegularClassSymbol -> this to unsubstitutedScope ( context ) <EOL> is FirTypeAliasSymbol -> { <EOL> val expandedType = resolvedExpandedTypeRef . coneType as? ConeClassLikeType <EOL> val expandedClass = expandedType ? . toRegularClassSymbol ( context . session ) <EOL> val expandedTypeScope = expandedType ? . scope ( context . session , context . scopeSession , CallableCopyTypeCalculator . DoNothing , requiredMembersPhase = FirResolvePhase . STATUS , ) <EOL> if ( expandedType != null && expandedClass != null && expandedTypeScope != null ) { <EOL> val outerType = outerType ( expandedType , context . session ) { it . outerClassSymbol ( context ) } <EOL> expandedClass to TypeAliasConstructorsSubstitutingScope ( this , expandedTypeScope , outerType ) <EOL> } else { <EOL> null <EOL> } <EOL> } <EOL> else -> null <EOL> } <EOL> }


private fun shouldCheckForMultiplatformRedeclaration ( dependency : FirBasedSymbol < * > , dependent : FirBasedSymbol < * > ) : Boolean

{ <EOL> if ( dependency . moduleData !in dependent . moduleData . allDependsOnDependencies ) return false <EOL> return ! isExpectAndNonExpect ( dependency , dependent ) <EOL> }


private fun FirDeclarationCollector < FirBasedSymbol < * > > . collectTopLevelConflict ( declaration : FirBasedSymbol < * > , declarationPresentation : String , containingFile : FirFile , conflictingSymbol : FirBasedSymbol < * > , conflictingPresentation : String ? = null , conflictingFile : FirFile ? = null , )

{ <EOL> conflictingSymbol . lazyResolveToPhase ( FirResolvePhase . STATUS ) <EOL> if ( conflictingSymbol == declaration ) return <EOL> if ( declaration . moduleData != conflictingSymbol . moduleData && ! shouldCheckForMultiplatformRedeclaration ( declaration , conflictingSymbol ) ) return <EOL> val actualConflictingPresentation = conflictingPresentation ? : FirRedeclarationPresenter . represent ( conflictingSymbol ) <EOL> if ( actualConflictingPresentation != declarationPresentation ) return <EOL> val actualConflictingFile = <EOL> conflictingFile ? : when ( conflictingSymbol ) { <EOL> is FirClassLikeSymbol < * > -> session . firProvider . getFirClassifierContainerFileIfAny ( conflictingSymbol ) <EOL> is FirCallableSymbol < * > -> session . firProvider . getFirCallableContainerFile ( conflictingSymbol ) <EOL> else -> null <EOL> } <EOL> if ( ! conflictingSymbol . isCollectable ( ) ) return <EOL> if ( areCompatibleMainFunctions ( declaration , containingFile , conflictingSymbol , actualConflictingFile , session ) ) return <EOL> @ OptIn ( SymbolInternals :: class ) <EOL> val conflicting = conflictingSymbol . fir <EOL> if ( conflicting is FirMemberDeclaration && ! session . visibilityChecker . isVisible ( conflicting , session , containingFile , emptyList ( ) , dispatchReceiver = null ) ) return <EOL> if ( areNonConflictingCallables ( declaration , conflictingSymbol ) ) return <EOL> declarationConflictingSymbols . getOrPut ( declaration ) { SmartSet . create ( ) } . add ( conflictingSymbol ) <EOL> }


private fun FirNamedFunctionSymbol . representsMainFunctionAllowingConflictingOverloads ( session : FirSession ) : Boolean

{ <EOL> if ( name != StandardNames . MAIN || ! callableId . isTopLevel || ! hasMainFunctionStatus ) return false <EOL> if ( receiverParameter != null || typeParameterSymbols . isNotEmpty ( ) ) return false <EOL> if ( valueParameterSymbols . isEmpty ( ) ) return true <EOL> val paramType = valueParameterSymbols . singleOrNull ( ) ? . resolvedReturnTypeRef ? . coneType ? . fullyExpandedType ( session ) ? : return false <EOL> if ( ! paramType . isNonPrimitiveArray ) return false <EOL> val typeArgument = paramType . typeArguments . singleOrNull ( ) as? ConeKotlinTypeProjection ? : return false <EOL> if ( typeArgument !is ConeKotlinType && typeArgument !is ConeKotlinTypeProjectionOut ) return false <EOL> return typeArgument . type . fullyExpandedType ( session ) . isString <EOL> }


private fun areCompatibleMainFunctions ( declaration1 : FirBasedSymbol < * > , file1 : FirFile , declaration2 : FirBasedSymbol < * > , file2 : FirFile ? , session : FirSession , )

= file1 != file2 <EOL> && declaration1 is FirNamedFunctionSymbol <EOL> && declaration2 is FirNamedFunctionSymbol <EOL> && declaration1 . representsMainFunctionAllowingConflictingOverloads ( session ) <EOL> && declaration2 . representsMainFunctionAllowingConflictingOverloads ( session )


private fun FirDeclarationCollector < * > . areNonConflictingCallables ( declaration : FirBasedSymbol < * > , conflicting : FirBasedSymbol < * > , ) : Boolean

{ <EOL> if ( isExpectAndNonExpect ( declaration , conflicting ) && declaration . moduleData != conflicting . moduleData ) return true <EOL> val declarationIsLowPriority = hasLowPriorityAnnotation ( declaration . annotations ) <EOL> val conflictingIsLowPriority = hasLowPriorityAnnotation ( conflicting . annotations ) <EOL> if ( declarationIsLowPriority != conflictingIsLowPriority ) return true <EOL> if ( declaration !is FirCallableSymbol < * > || conflicting !is FirCallableSymbol < * > ) return false <EOL> val declarationIsFinal = declaration . isEffectivelyFinal ( session ) <EOL> val conflictingIsFinal = conflicting . isEffectivelyFinal ( session ) <EOL> if ( declarationIsFinal && conflictingIsFinal ) { <EOL> val declarationIsHidden = declaration . isDeprecationLevelHidden ( session ) <EOL> if ( declarationIsHidden ) return true <EOL> val conflictingIsHidden = conflicting . isDeprecationLevelHidden ( session ) <EOL> if ( conflictingIsHidden ) return true <EOL> } <EOL> return session . declarationOverloadabilityHelper . isOverloadable ( declaration , conflicting ) <EOL> }


internal fun FirVariable . getDestructuredParameter ( ) : FirValueParameterSymbol ?

{ <EOL> val initializer = initializer <EOL> if ( initializer !is FirComponentCall ) return null <EOL> if ( initializer . source ? . kind !is KtFakeSourceElementKind . DesugaredComponentFunctionCall ) return null <EOL> val receiver = initializer . dispatchReceiver ? : initializer . extensionReceiver ? : return null <EOL> if ( receiver !is FirPropertyAccessExpression ) return null <EOL> val calleeReference = receiver . calleeReference as? FirResolvedNamedReference ? : return null <EOL> return calleeReference . resolvedSymbol as? FirValueParameterSymbol <EOL> }


fun checkForLocalRedeclarations ( elements : List < FirElement > , context : CheckerContext , reporter : DiagnosticReporter )

{ <EOL> if ( elements . size <= <NUM_LIT:1> ) return <EOL> val multimap = ListMultimap < Name , FirBasedSymbol < * > > ( ) <EOL> for ( element in elements ) { <EOL> val name : Name ? <EOL> val symbol : FirBasedSymbol < * > ? <EOL> when ( element ) { <EOL> is FirVariable -> { <EOL> symbol = element . symbol <EOL> name = element . name <EOL> } <EOL> is FirOuterClassTypeParameterRef -> { <EOL> continue <EOL> } <EOL> is FirTypeParameterRef -> { <EOL> symbol = element . symbol <EOL> name = symbol . name <EOL> } <EOL> else -> { <EOL> symbol = null <EOL> name = null <EOL> } <EOL> } <EOL> if ( name ? . isSpecial == false ) { <EOL> multimap . put ( name , symbol ! ! ) <EOL> } <EOL> } <EOL> for ( key in multimap . keys ) { <EOL> val conflictingElements = multimap [ key ] <EOL> if ( conflictingElements . size > <NUM_LIT:1> ) { <EOL> for ( conflictingElement in conflictingElements ) { <EOL> reporter . reportOn ( conflictingElement . source , FirErrors . REDECLARATION , conflictingElements , context ) <EOL> } <EOL> } <EOL> } <EOL> }

/** Checks for redeclarations of value and type parameters, and local variables. */


{ <EOL> emitPool . shutdown ( ) <EOL> reqPool . shutdown ( ) <EOL> emitPool . awaitTermination ( <NUM_LIT:10> , TimeUnit . SECONDS ) <EOL> reqPool . awaitTermination ( <NUM_LIT:10> , TimeUnit . SECONDS ) <EOL> }


{ <EOL> val expectedValue = AtomicLong ( <NUM_LIT:0> ) <EOL> val requestedTill = AtomicLong ( <NUM_LIT:0> ) <EOL> val callingOnNext = AtomicInteger ( ) <EOL> val publisher = mtFlow ( ) . asPublisher ( ) <EOL> var error = false <EOL> publisher . subscribe ( object : Subscriber < Long > { <EOL> private var demand = <NUM_LIT:0L> <EOL> override fun onComplete ( ) { <EOL> } <EOL> override fun onSubscribe ( sub : Subscription ) { <EOL> subscription = sub <EOL> maybeRequestMore ( ) <EOL> } <EOL> private fun maybeRequestMore ( ) { <EOL> if ( demand >= minDemand ) return <EOL> val nextDemand = Random . nextLong ( minDemand + <NUM_LIT:1> .. maxDemand ) <EOL> val more = nextDemand - demand <EOL> demand = nextDemand <EOL> requestedTill . addAndGet ( more ) <EOL> subscription . request ( more ) <EOL> } <EOL> override fun onNext ( value : Long ) { <EOL> check ( callingOnNext . getAndIncrement ( ) == <NUM_LIT:0> ) <EOL> check ( value == expectedValue . get ( ) ) <EOL> check ( value < requestedTill . get ( ) ) <EOL> val nextExpected = value + <NUM_LIT:1> <EOL> expectedValue . set ( nextExpected ) <EOL> reqPool . execute { <EOL> demand -- <EOL> maybeRequestMore ( ) <EOL> } <EOL> callingOnNext . decrementAndGet ( ) <EOL> } <EOL> override fun onError ( ex : Throwable ? ) { <EOL> error = true <EOL> error ( "<STR_LIT>" , ex ) <EOL> } <EOL> } ) <EOL> var prevExpected = - <NUM_LIT:1L> <EOL> for ( second in <NUM_LIT:1> .. testDurationSec ) { <EOL> if ( error ) break <EOL> Thread . sleep ( <NUM_LIT> ) <EOL> val expected = expectedValue . get ( ) <EOL> println ( "<STR_LIT>" ) <EOL> check ( expected > prevExpected ) <EOL> prevExpected = expected <EOL> } <EOL> if ( ! error ) { <EOL> subscription . cancel ( ) <EOL> runBlocking { <EOL> ( subscription as AbstractCoroutine < * > ) . join ( ) <EOL> } <EOL> } <EOL> }


= flow { <EOL> while ( currentCoroutineContext ( ) . isActive ) { <EOL> emit ( aWait ( ) ) <EOL> } <EOL> }


= suspendCancellableCoroutine { cont -> <EOL> emitPool . execute ( Runnable { <EOL> cont . resume ( nextValue . getAndIncrement ( ) ) <EOL> } ) <EOL> }


{ <EOL> val a1 = A ( true ) <EOL> if ( a1 . prop != <NUM_LIT:1> ) return "<STR_LIT>" <EOL> val a2 = A ( false ) <EOL> if ( a2 . prop != <NUM_LIT:2> ) return "<STR_LIT>" <EOL> return "<STR_LIT:OK>" <EOL> }


fun packageMetadataParts ( fqName : String ) : Set < String >


fun packageMetadata ( fqName : String , partName : String ) : ByteArray


fun irDeclaration ( index : Int , fileIndex : Int ) : ByteArray


fun type ( index : Int , fileIndex : Int ) : ByteArray


fun signature ( index : Int , fileIndex : Int ) : ByteArray


fun string ( index : Int , fileIndex : Int ) : ByteArray


fun body ( index : Int , fileIndex : Int ) : ByteArray


fun debugInfo ( index : Int , fileIndex : Int ) : ByteArray ?


fun file ( index : Int ) : ByteArray


fun fileCount ( ) : Int


fun types ( fileIndex : Int ) : ByteArray


fun signatures ( fileIndex : Int ) : ByteArray


fun strings ( fileIndex : Int ) : ByteArray


fun declarations ( fileIndex : Int ) : ByteArray


fun bodies ( fileIndex : Int ) : ByteArray


fun BaseKotlinLibrary . unresolvedDependencies ( lenient : Boolean = false ) : List < UnresolvedLibrary >

= <EOL> manifestProperties . propertyList ( KLIB_PROPERTY_DEPENDS , escapeInQuotes = true ) <EOL> . map { UnresolvedLibrary ( it , manifestProperties . getProperty ( "<STR_LIT>" ) , lenient = lenient ) }


= <EOL> C ( ) . map . entries . first ( ) . let { it . key + it . value }


fun checkBooleanVararg ( vararg xs : Boolean )

{ <EOL> assertTrue ( xs is BooleanArray ) <EOL> }


fun checkLongVararg ( vararg xs : Long )

{ <EOL> assertTrue ( xs is LongArray ) <EOL> }


fun checkCharVararg ( vararg xs : Char )

{ <EOL> assertTrue ( xs is CharArray ) <EOL> }


{ <EOL> checkBooleanVararg ( ) <EOL> checkBooleanVararg ( true ) <EOL> checkBooleanVararg ( true , false ) <EOL> checkBooleanVararg ( * booleanArrayOf ( ) ) <EOL> checkBooleanVararg ( * booleanArrayOf ( true , false ) ) <EOL> checkBooleanVararg ( true , * booleanArrayOf ( false ) , false , * booleanArrayOf ( ) ) <EOL> checkLongVararg ( ) <EOL> checkLongVararg ( <NUM_LIT:1L> ) <EOL> checkLongVararg ( <NUM_LIT> , <NUM_LIT:3L> ) <EOL> checkLongVararg ( * longArrayOf ( ) ) <EOL> checkLongVararg ( * longArrayOf ( <NUM_LIT> , <NUM_LIT> ) ) <EOL> checkLongVararg ( * longArrayOf ( <NUM_LIT> , <NUM_LIT> ) , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) <EOL> checkCharVararg ( ) <EOL> checkCharVararg ( '<CHAR_LIT:a>' ) <EOL> checkCharVararg ( '<CHAR_LIT:b>' , '<CHAR_LIT:c>' ) <EOL> checkCharVararg ( * charArrayOf ( ) ) <EOL> checkCharVararg ( * charArrayOf ( '<CHAR_LIT:d>' , '<CHAR_LIT:e>' ) ) <EOL> checkCharVararg ( * charArrayOf ( ) , * charArrayOf ( ) , * charArrayOf ( ) ) <EOL> checkCharVararg ( '<CHAR_LIT:e>' , * charArrayOf ( ) , '<CHAR_LIT:f>' , * charArrayOf ( ) , '<CHAR_LIT:x>' , * charArrayOf ( ) , '<CHAR_LIT:d>' ) <EOL> return "<STR_LIT:OK>" <EOL> }


fun lambdaConsumer ( fn : ( A ) -> Unit )


fun extensionConsumer ( fn : A . ( ) -> Unit )


{ <EOL> lambdaConsumer { it } <EOL> extensionConsumer { this } <EOL> }


operator fun getValue ( t : Any ? , p : KProperty < * > ) : T

= inner


operator fun setValue ( t : Any ? , p : KProperty < * > , i : T )

{ inner = i }


{ <EOL> if ( Foo . A . f != <NUM_LIT:11> ) return "<STR_LIT:failU+00201>" <EOL> if ( Foo . B . f != <NUM_LIT:11> ) return "<STR_LIT:failU+00202>" <EOL> Foo . B = Foo ( <NUM_LIT:12> ) <EOL> if ( Foo . B . f != <NUM_LIT:12> ) return "<STR_LIT:failU+00203>" <EOL> if ( FooTrait . A . f != <NUM_LIT:11> ) return "<STR_LIT:failU+00204>" <EOL> if ( FooTrait . B . f != <NUM_LIT:11> ) return "<STR_LIT:failU+00205>" <EOL> FooTrait . B = Foo ( <NUM_LIT:12> ) <EOL> if ( FooTrait . B . f != <NUM_LIT:12> ) return "<STR_LIT>" <EOL> return "<STR_LIT:OK>" <EOL> }


fun NameEntity . isTsStdlibPrefixed ( ) : Boolean

{ <EOL> return hasPrefix ( TSLIBROOT ) <EOL> }


override fun < R , D > accept ( visitor : FirVisitor < R , D > , data : D ) : R

= <EOL> visitor . visitConstructor ( this , data )


@ Suppress ( "<STR_LIT:UNCHECKED_CAST>" ) <EOL> override fun < E : FirElement , D > transform ( transformer : FirTransformer < D > , data : D ) : E

= <EOL> transformer . transformConstructor ( this , data ) as E


abstract override fun replaceStatus ( newStatus : FirDeclarationStatus )


abstract override fun replaceReturnTypeRef ( newReturnTypeRef : FirTypeRef )


abstract override fun replaceReceiverParameter ( newReceiverParameter : FirReceiverParameter ? )


abstract override fun replaceDeprecationsProvider ( newDeprecationsProvider : DeprecationsProvider )


abstract override fun replaceContextReceivers ( newContextReceivers : List < FirContextReceiver > )


abstract override fun replaceControlFlowGraphReference ( newControlFlowGraphReference : FirControlFlowGraphReference ? )


abstract override fun replaceValueParameters ( newValueParameters : List < FirValueParameter > )


abstract override fun replaceContractDescription ( newContractDescription : FirContractDescription ? )


abstract override fun replaceAnnotations ( newAnnotations : List < FirAnnotation > )


abstract fun replaceDelegatedConstructor ( newDelegatedConstructor : FirDelegatedConstructorCall ? )


abstract override fun replaceBody ( newBody : FirBlock ? )


abstract override fun < D > transformTypeParameters ( transformer : FirTransformer < D > , data : D ) : FirConstructor


abstract override fun < D > transformStatus ( transformer : FirTransformer < D > , data : D ) : FirConstructor


abstract override fun < D > transformReturnTypeRef ( transformer : FirTransformer < D > , data : D ) : FirConstructor


abstract override fun < D > transformReceiverParameter ( transformer : FirTransformer < D > , data : D ) : FirConstructor


abstract override fun < D > transformValueParameters ( transformer : FirTransformer < D > , data : D ) : FirConstructor


abstract override fun < D > transformContractDescription ( transformer : FirTransformer < D > , data : D ) : FirConstructor


abstract override fun < D > transformAnnotations ( transformer : FirTransformer < D > , data : D ) : FirConstructor


abstract fun < D > transformDelegatedConstructor ( transformer : FirTransformer < D > , data : D ) : FirConstructor


abstract override fun < D > transformBody ( transformer : FirTransformer < D > , data : D ) : FirConstructor


= value + s


= ( A :: f ) ( this , s )


{ <EOL> val a = A ( "<STR_LIT:aaa>" ) <EOL> assertEquals ( "<STR_LIT>" , a . bar ( "<STR_LIT>" ) ) <EOL> assertEquals ( "<STR_LIT>" , a . baz ( "<STR_LIT>" ) ) <EOL> return "<STR_LIT:OK>" <EOL> }


fun runSuspend ( c : suspend ( ) -> Unit )

{ <EOL> c . startCoroutine ( EmptyContinuation ) <EOL> }


{ test = "<STR_LIT:OK>" }


inline suspend fun invokeSuspend ( fn : suspend ( ) -> Unit )

{ fn ( ) }


{ <EOL> runSuspend { <EOL> invokeSuspend ( :: foo ) <EOL> } <EOL> return test <EOL> }


@ ExperimentalStdlibApi <EOL> private fun KType . computeJavaType ( forceWrapper : Boolean = false ) : Type

{ <EOL> when ( val classifier = classifier ) { <EOL> is KTypeParameter -> return TypeVariableImpl ( classifier ) <EOL> is KClass < * > -> { <EOL> val jClass = if ( forceWrapper ) classifier . javaObjectType else classifier . java <EOL> val arguments = arguments <EOL> if ( arguments . isEmpty ( ) ) return jClass <EOL> if ( jClass . isArray ) { <EOL> if ( jClass . componentType . isPrimitive ) return jClass <EOL> val ( variance , elementType ) = arguments . singleOrNull ( ) <EOL> ? : throw IllegalArgumentException ( "<STR_LIT>" ) <EOL> return when ( variance ) { <EOL> null , KVariance . IN -> jClass <EOL> KVariance . INVARIANT , KVariance . OUT -> { <EOL> val javaElementType = elementType ! ! . computeJavaType ( ) <EOL> if ( javaElementType is Class < * > ) jClass else GenericArrayTypeImpl ( javaElementType ) <EOL> } <EOL> } <EOL> } <EOL> return createPossiblyInnerType ( jClass , arguments ) <EOL> } <EOL> else -> throw UnsupportedOperationException ( "<STR_LIT>" ) <EOL> } <EOL> }


@ ExperimentalStdlibApi <EOL> private fun createPossiblyInnerType ( jClass : Class < * > , arguments : List < KTypeProjection > ) : Type

{ <EOL> val ownerClass = jClass . declaringClass <EOL> ? : return ParameterizedTypeImpl ( jClass , null , arguments . map ( KTypeProjection :: javaType ) ) <EOL> if ( Modifier . isStatic ( jClass . modifiers ) ) <EOL> return ParameterizedTypeImpl ( jClass , ownerClass , arguments . map ( KTypeProjection :: javaType ) ) <EOL> val n = jClass . typeParameters . size <EOL> return ParameterizedTypeImpl ( jClass , createPossiblyInnerType ( ownerClass , arguments . subList ( n , arguments . size ) ) , arguments . subList ( <NUM_LIT:0> , n ) . map ( KTypeProjection :: javaType ) ) <EOL> }


@ Suppress ( "<STR_LIT>" ) <EOL> fun getTypeName ( ) : String


= typeParameter . name


override fun getGenericDeclaration ( ) : GenericDeclaration

= <EOL> TODO ( "<STR_LIT>" )


override fun getBounds ( ) : Array < Type >

= typeParameter . upperBounds . map { it . computeJavaType ( forceWrapper = true ) } . toTypedArray ( )


= name


override fun equals ( other : Any ? ) : Boolean

= <EOL> other is TypeVariable < * > && name == other . name && genericDeclaration == other . genericDeclaration


= <EOL> name . hashCode ( ) xor genericDeclaration . hashCode ( )


= getTypeName ( )


@ Suppress ( "<STR_LIT>" , "<STR_LIT:UNUSED_PARAMETER>" ) <EOL> fun < T : Annotation > getAnnotation ( annotationClass : Class < T > ) : T ?

= null


@ Suppress ( "<STR_LIT>" ) <EOL> fun getAnnotations ( ) : Array < Annotation >

= emptyArray ( )


@ Suppress ( "<STR_LIT>" ) <EOL> fun getDeclaredAnnotations ( ) : Array < Annotation >

= emptyArray ( )


override fun getGenericComponentType ( ) : Type

= elementType


= "<STR_LIT>"


= other is GenericArrayType && genericComponentType == other . genericComponentType


= genericComponentType . hashCode ( )


override fun getUpperBounds ( ) : Array < Type >

= <EOL> arrayOf ( upperBound ? : Any :: class . java )


override fun getLowerBounds ( ) : Array < Type >

= <EOL> if ( lowerBound == null ) emptyArray ( ) else arrayOf ( lowerBound )


= when { <EOL> lowerBound != null -> "<STR_LIT>" <EOL> upperBound != null && upperBound != Any :: class . java -> "<STR_LIT>" <EOL> else -> "<STR_LIT:?>" <EOL> }


= <EOL> other is WildcardType && upperBounds . contentEquals ( other . upperBounds ) && lowerBounds . contentEquals ( other . lowerBounds )


= <EOL> upperBounds . contentHashCode ( ) xor lowerBounds . contentHashCode ( )


= rawType


= ownerType


override fun getActualTypeArguments ( ) : Array < Type >

= typeArguments


= buildString { <EOL> if ( ownerType != null ) { <EOL> append ( typeToString ( ownerType ) ) <EOL> append ( "<STR_LIT:$>" ) <EOL> append ( rawType . simpleName ) <EOL> } else { <EOL> append ( typeToString ( rawType ) ) <EOL> } <EOL> if ( typeArguments . isNotEmpty ( ) ) { <EOL> typeArguments . joinTo ( this , prefix = "<STR_LIT:<>" , postfix = "<STR_LIT:>>" , transform = :: typeToString ) <EOL> } <EOL> }


= <EOL> other is ParameterizedType && rawType == other . rawType && ownerType == other . ownerType && <EOL> actualTypeArguments . contentEquals ( other . actualTypeArguments )


= <EOL> rawType . hashCode ( ) xor ownerType . hashCode ( ) xor actualTypeArguments . contentHashCode ( )


= getTypeName ( )


private fun typeToString ( type : Type ) : String

= <EOL> if ( type is Class < * > ) { <EOL> if ( type . isArray ) { <EOL> val unwrap = generateSequence ( type , Class < * > :: getComponentType ) <EOL> unwrap . last ( ) . name + "<STR_LIT>" . repeat ( unwrap . count ( ) ) <EOL> } else type . name <EOL> } else type . toString ( )


override fun visitMethod ( access : Int , name : String ? , desc : String ? , signature : String ? , exceptions : Array < out String > ? <EOL> ) : MethodVisitor ?

{ <EOL> return if ( access . isAbi ( ) ) { <EOL> super . visitMethod ( access , name , desc , signature , exceptions ) <EOL> } else { <EOL> null <EOL> } <EOL> }


override fun visitAnnotation ( desc : String ? , visible : Boolean ) : AnnotationVisitor ?

{ <EOL> return if ( desc != null && desc != metadataDescriptor ) { <EOL> super . visitAnnotation ( desc , visible ) <EOL> } else { <EOL> null <EOL> } <EOL> }


override fun visitField ( access : Int , name : String ? , desc : String ? , signature : String ? , value : Any ? ) : FieldVisitor ?

{ <EOL> return if ( access . isAbi ( ) ) { <EOL> super . visitField ( access , name , desc , signature , value ) <EOL> } else { <EOL> null <EOL> } <EOL> }


override fun visitInnerClass ( name : String ? , outerName : String ? , innerName : String ? , access : Int )

{ <EOL> if ( access . isAbi ( ) && outerName != null && innerName != null ) { <EOL> super . visitInnerClass ( name , outerName , innerName , access ) <EOL> } <EOL> }


= writer . toByteArray ( )


= ( this and Opcodes . ACC_PRIVATE ) == <NUM_LIT:0>


= <NUM_LIT:1>


= <NUM_LIT:2>


{ <EOL> val ( a , b ) = A ( ) <EOL> return if ( a == <NUM_LIT:1> && b == <NUM_LIT:2> ) "<STR_LIT:OK>" else "<STR_LIT:fail>" <EOL> }


fun < T , R > foo ( first : ( ) -> T , second : ( T ) -> R ) : R

= throw Exception ( )


{ <EOL> val r = foo ( { <NUM_LIT:4> } , { "<STR_LIT>" } ) <EOL> r checkType { _ < String > ( ) } <EOL> }


public abstract fun getInheritorsOfSealedClass ( classSymbol : KtNamedClassOrObjectSymbol ) : List < KtNamedClassOrObjectSymbol >


public abstract fun getEnumEntries ( classSymbol : KtNamedClassOrObjectSymbol ) : List < KtEnumEntrySymbol >


public fun KtNamedClassOrObjectSymbol . getSealedClassInheritors ( ) : List < KtNamedClassOrObjectSymbol >

= <EOL> withValidityAssertion { analysisSession . inheritorsProvider . getInheritorsOfSealedClass ( this ) }


public fun KtNamedClassOrObjectSymbol . getEnumEntries ( ) : List < KtEnumEntrySymbol >

= <EOL> withValidityAssertion { analysisSession . inheritorsProvider . getEnumEntries ( this ) }


fun < T > materializeDelegate ( ) : Delegate < T >

= Delegate ( )


operator fun < K > K . provideDelegate ( receiver : Any ? , property : kotlin . reflect . KProperty < * > ) : K

= this


operator fun < X > Delegate < X > . getValue ( thisRef : Any ? , property : kotlin . reflect . KProperty < * > ) : X

= TODO ( )


{ <EOL> try { <EOL> C ( ) <EOL> return "<STR_LIT:Fail>" <EOL> } catch ( e : NotImplementedError ) { <EOL> } <EOL> try { <EOL> Foo ( ) <EOL> return "<STR_LIT:Fail>" <EOL> } catch ( e : NotImplementedError ) { <EOL> } <EOL> try { <EOL> Bar ( ) <EOL> return "<STR_LIT:Fail>" <EOL> } catch ( e : NotImplementedError ) { <EOL> } <EOL> return "<STR_LIT:OK>" <EOL> }


@ Test <EOL> fun testIllegalRepetitions ( )

{ <EOL> Assertions . assertThrows ( IllegalArgumentException :: class . java ) { <EOL> RepeatVector ( n = - <NUM_LIT:10> ) <EOL> } <EOL> }


{ <EOL> val layer = RepeatVector ( n = <NUM_LIT:2> ) <EOL> val x = Array ( <NUM_LIT:10> ) { FloatArray ( <NUM_LIT:10> ) { <NUM_LIT> } } <EOL> val y = layer ( x ) <EOL> Assertions . assertArrayEquals ( intArrayOf ( <NUM_LIT:10> , layer . n , <NUM_LIT:10> ) , y . shape ( ) . toIntArray ( ) ) <EOL> }


{ <EOL> val layer = RepeatVector ( n = <NUM_LIT:2> ) <EOL> val x = Array ( <NUM_LIT:3> ) { FloatArray ( <NUM_LIT:3> ) { it . toFloat ( ) } } <EOL> val y = layer ( x ) <EOL> val actual = y . tensor ( ) . copyTo ( Array ( <NUM_LIT:3> ) { Array ( layer . n ) { FloatArray ( <NUM_LIT:3> ) } } ) <EOL> val expected = arrayOf ( arrayOf ( floatArrayOf ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) , floatArrayOf ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ) , arrayOf ( floatArrayOf ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) , floatArrayOf ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ) , arrayOf ( floatArrayOf ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) , floatArrayOf ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ) ) <EOL> Assertions . assertArrayEquals ( expected , actual ) <EOL> }


private operator fun RepeatVector . invoke ( input : Array < FloatArray > ) : Output < Float >

= Ops . create ( ) . let { tf -> <EOL> val inputOp = tf . constant ( input ) <EOL> val isTraining = tf . constant ( true ) <EOL> val numberOfLosses = tf . constant ( <NUM_LIT> ) <EOL> build ( tf , inputOp , isTraining , numberOfLosses ) . asOutput ( ) <EOL> }


= "<STR_LIT>"


fun foo ( s : String , p : String ) : String

= "<STR_LIT>"


= when { <EOL> x . foo ( "<STR_LIT:first>" ) != "<STR_LIT>" -> "<STR_LIT:failU+00201>" <EOL> x . bar ( "<STR_LIT:second>" ) != "<STR_LIT>" -> "<STR_LIT:failU+00202>" <EOL> x . qux ( "<STR_LIT>" ) != "<STR_LIT>" -> "<STR_LIT:failU+00203>" <EOL> foo ( "<STR_LIT:first>" ) != "<STR_LIT>" -> "<STR_LIT:failU+00204>" <EOL> bar ( "<STR_LIT:second>" ) != "<STR_LIT>" -> "<STR_LIT:failU+00205>" <EOL> qux ( "<STR_LIT>" ) != "<STR_LIT>" -> "<STR_LIT>" <EOL> else -> "<STR_LIT:OK>" <EOL> }


= lib ( )


@ InlineOnly <EOL> @ SinceKotlin ( "<STR_LIT:1.4>" ) <EOL> public actual inline fun CancellationException ( message : String ? , cause : Throwable ? ) : CancellationException

{ <EOL> return CancellationException ( message ) . also { it . initCause ( cause ) } <EOL> }


@ InlineOnly <EOL> @ SinceKotlin ( "<STR_LIT:1.4>" ) <EOL> public actual inline fun CancellationException ( cause : Throwable ? ) : CancellationException

{ <EOL> return CancellationException ( cause ? . toString ( ) ) . also { it . initCause ( cause ) } <EOL> }


fun hasErrorElement ( psi : PsiNode ) : Boolean

= <EOL> psi . children . any { it . `class` == NodeClass . ERROR || hasErrorElement ( it ) }


fun getErrorElements ( psi : PsiNode , codeBuffer : StringBuffer = StringBuffer ( ) , errorElementsText : ErrorElements = mutableListOf ( ) ) : ErrorElements

{ <EOL> psi . children . forEach { <EOL> if ( it . `class` == NodeClass . ERROR ) { <EOL> val codeLines = codeBuffer . lines ( ) <EOL> errorElementsText . add ( Pair ( it . text ! ! , Position ( codeLines . size , codeLines . last ( ) . length + <NUM_LIT:1> ) ) ) <EOL> } <EOL> if ( it . text != null && ( it . `class` == NodeClass . TOKEN || it . `class` == NodeClass . WHITESPACE ) ) { <EOL> codeBuffer . append ( if ( it . `class` == NodeClass . WHITESPACE ) it . text . replace ( "<STR_LIT>" , System . lineSeparator ( ) ) else it . text ) <EOL> } <EOL> getErrorElements ( it , codeBuffer , errorElementsText ) <EOL> } <EOL> return errorElementsText <EOL> }


private fun parse ( psiTextAsLines : List < String > ) : PsiNode

{ <EOL> val root = PsiNode ( NodeClass . RULE , "<STR_LIT>" ) <EOL> val nodes = Stack < PsiNode > ( ) . apply { push ( root ) } <EOL> var prevNode = root <EOL> var matcher : Matcher ? = null <EOL> val checkStack : ( currentDeepLevel : Int ) -> Unit = { currentDeepLevel : Int -> <EOL> when { <EOL> currentDeepLevel > nodes . size -> nodes . push ( prevNode ) <EOL> currentDeepLevel < nodes . size -> nodes . pop ( ) <EOL> } <EOL> } <EOL> val addNode = { offset : String , `class` : NodeClass , type : String ? , text : String ? -> <EOL> val currentDeepLevel = offset . split ( "<STR_LIT:U+0020>" . repeat ( WHITESPACES_NUMBER_OFFSET ) ) . size <EOL> checkStack ( currentDeepLevel ) <EOL> PsiNode ( `class` , type , text ) . also { <EOL> nodes . peek ( ) . children . add ( it ) <EOL> prevNode = it <EOL> } <EOL> } <EOL> val matcherFind = { line : String , pattern : Pattern -> <EOL> matcher = pattern . matcher ( line ) <EOL> matcher ? . find ( ) ? : false <EOL> } <EOL> psiTextAsLines . forEach { line -> <EOL> when { <EOL> matcherFind ( line , rulePattern ) -> <EOL> addNode ( matcher ! ! . group ( "<STR_LIT>" ) , NodeClass . RULE , matcher ! ! . group ( "<STR_LIT:type>" ) , null ) <EOL> matcherFind ( line , tokenPattern ) -> <EOL> addNode ( matcher ! ! . group ( "<STR_LIT>" ) , NodeClass . TOKEN , matcher ! ! . group ( "<STR_LIT:type>" ) , matcher ! ! . group ( "<STR_LIT:text>" ) ) <EOL> matcherFind ( line , errorElementPattern ) -> <EOL> addNode ( matcher ! ! . group ( "<STR_LIT>" ) , NodeClass . ERROR , null , matcher ! ! . group ( "<STR_LIT>" ) ) <EOL> matcherFind ( line , whitespaceElementPattern ) -> <EOL> addNode ( matcher ! ! . group ( "<STR_LIT>" ) , NodeClass . WHITESPACE , null , matcher ! ! . group ( "<STR_LIT>" ) ) <EOL> matcherFind ( line , otherElementPattern ) -> <EOL> addNode ( matcher ! ! . group ( "<STR_LIT>" ) , NodeClass . OTHER , null , matcher ! ! . group ( "<STR_LIT>" ) ) <EOL> } <EOL> } <EOL> return root <EOL> }


= parse ( psiText . split ( System . lineSeparator ( ) ) . run { subList ( <NUM_LIT:1> , lastIndex ) } )


fun androidIdToName ( id : String ) : ResourceIdentifier ?

{ <EOL> val values = AndroidConst . IDENTIFIER_REGEX . matchEntire ( id ) ? . groupValues ? : return null <EOL> val packageName = values [ <NUM_LIT:3> ] <EOL> return ResourceIdentifier ( getJavaIdentifierNameForResourceName ( values [ <NUM_LIT:4> ] ) , if ( packageName . isEmpty ( ) ) null else packageName ) <EOL> }


fun getJavaIdentifierNameForResourceName ( styleName : String )

= buildString { <EOL> for ( char in styleName ) { <EOL> when ( char ) { <EOL> '<CHAR_LIT:.>' , '<CHAR_LIT:->' , '<CHAR_LIT::>' -> append ( '<CHAR_LIT:_>' ) <EOL> else -> append ( char ) <EOL> } <EOL> } <EOL> }


fun isWidgetTypeIgnored ( xmlType : String ) : Boolean

{ <EOL> return ( xmlType . isEmpty ( ) || xmlType in AndroidConst . IGNORED_XML_WIDGET_TYPES ) <EOL> }


internal fun < T > List < T > . forEachUntilLast ( operation : ( T ) -> Unit )

{ <EOL> val lastIndex = lastIndex <EOL> forEachIndexed { i , t -> <EOL> if ( i < lastIndex ) { <EOL> operation ( t ) <EOL> } <EOL> } <EOL> }


fun writeBytes ( bytes : ByteArray , tag : Int )

{ <EOL> out . encode32 ( ( tag shl <NUM_LIT:3> ) or SIZE_DELIMITED ) <EOL> writeBytes ( bytes ) <EOL> }


{ <EOL> out . encode32 ( bytes . size ) <EOL> out . write ( bytes ) <EOL> }


fun writeOutput ( output : ByteArrayOutput , tag : Int )

{ <EOL> out . encode32 ( ( tag shl <NUM_LIT:3> ) or SIZE_DELIMITED ) <EOL> writeOutput ( output ) <EOL> }


fun writeOutput ( output : ByteArrayOutput )

{ <EOL> out . encode32 ( output . size ( ) ) <EOL> out . write ( output ) <EOL> }


fun writeInt ( value : Int , tag : Int , format : ProtoIntegerType )

{ <EOL> val wireType = if ( format == ProtoIntegerType . FIXED ) i32 else VARINT <EOL> out . encode32 ( ( tag shl <NUM_LIT:3> ) or wireType ) <EOL> out . encode32 ( value , format ) <EOL> }


{ <EOL> out . encode32 ( value ) <EOL> }


fun writeLong ( value : Long , tag : Int , format : ProtoIntegerType )

{ <EOL> val wireType = if ( format == ProtoIntegerType . FIXED ) i64 else VARINT <EOL> out . encode32 ( ( tag shl <NUM_LIT:3> ) or wireType ) <EOL> out . encode64 ( value , format ) <EOL> }


{ <EOL> out . encode64 ( value ) <EOL> }


fun writeString ( value : String , tag : Int )

{ <EOL> val bytes = value . encodeToByteArray ( ) <EOL> writeBytes ( bytes , tag ) <EOL> }


{ <EOL> val bytes = value . encodeToByteArray ( ) <EOL> writeBytes ( bytes ) <EOL> }


fun writeDouble ( value : Double , tag : Int )

{ <EOL> out . encode32 ( ( tag shl <NUM_LIT:3> ) or i64 ) <EOL> out . writeLong ( value . reverseBytes ( ) ) <EOL> }


{ <EOL> out . writeLong ( value . reverseBytes ( ) ) <EOL> }


fun writeFloat ( value : Float , tag : Int )

{ <EOL> out . encode32 ( ( tag shl <NUM_LIT:3> ) or i32 ) <EOL> out . writeInt ( value . reverseBytes ( ) ) <EOL> }


{ <EOL> out . writeInt ( value . reverseBytes ( ) ) <EOL> }


private fun ByteArrayOutput . encode32 ( number : Int , format : ProtoIntegerType = ProtoIntegerType . DEFAULT )

{ <EOL> when ( format ) { <EOL> ProtoIntegerType . FIXED -> out . writeInt ( number . reverseBytes ( ) ) <EOL> ProtoIntegerType . DEFAULT -> encodeVarint64 ( number . toLong ( ) ) <EOL> ProtoIntegerType . SIGNED -> encodeVarint32 ( ( ( number shl <NUM_LIT:1> ) xor ( number shr <NUM_LIT:31> ) ) ) <EOL> } <EOL> }


private fun ByteArrayOutput . encode64 ( number : Long , format : ProtoIntegerType = ProtoIntegerType . DEFAULT )

{ <EOL> when ( format ) { <EOL> ProtoIntegerType . FIXED -> out . writeLong ( number . reverseBytes ( ) ) <EOL> ProtoIntegerType . DEFAULT -> encodeVarint64 ( number ) <EOL> ProtoIntegerType . SIGNED -> encodeVarint64 ( ( number shl <NUM_LIT:1> ) xor ( number shr <NUM_LIT> ) ) <EOL> } <EOL> }


private fun Float . reverseBytes ( ) : Int

= toRawBits ( ) . reverseBytes ( )


private fun Double . reverseBytes ( ) : Long

= toRawBits ( ) . reverseBytes ( )


{ <EOL> val duplicatedOwnerListEntries = owners . permittedOwners . groupBy { it . name } <EOL> . filterValues { occurrences -> occurrences . size > <NUM_LIT:1> } <EOL> . values <EOL> if ( duplicatedOwnerListEntries . isNotEmpty ( ) ) { <EOL> fail ( buildString { <EOL> appendLine ( "<STR_LIT>" ) <EOL> for ( group in duplicatedOwnerListEntries ) { <EOL> group . joinTo ( this , separator = "<STR_LIT:\n>" , postfix = "<STR_LIT>" ) <EOL> } <EOL> } ) <EOL> } <EOL> }


{ <EOL> val permittedOwnerNames = owners . permittedOwners . map { it . name } . toSet ( ) <EOL> val problems = mutableListOf < String > ( ) <EOL> for ( pattern in owners . patterns ) { <EOL> if ( pattern !is OwnershipPattern . Pattern ) continue <EOL> for ( owner in pattern . owners ) { <EOL> if ( owner !in permittedOwnerNames ) { <EOL> problems += "<STR_LIT>" <EOL> } <EOL> } <EOL> } <EOL> if ( problems . isNotEmpty ( ) ) { <EOL> fail ( problems . joinToString ( "<STR_LIT:\n>" ) ) <EOL> } <EOL> }


{ <EOL> val fallbackRule = owners . patterns . first ( ) <EOL> assertEquals ( "<STR_LIT>" , "<STR_LIT:*>" , fallbackRule . pattern ) <EOL> assertIs < OwnershipPattern . Pattern > ( fallbackRule , "<STR_LIT>" ) <EOL> }


{ <EOL> val checker = FileOwnershipChecker ( owners , root = File ( "<STR_LIT:.>" ) ) <EOL> checker . check ( ) <EOL> val problems = mutableListOf < String > ( ) <EOL> if ( checker . unmatchedFilesTop . isNotEmpty ( ) ) { <EOL> problems . add ( "<STR_LIT>" + checker . unmatchedFilesTop . joinToString ( "<STR_LIT:\n>" ) { "<STR_LIT>" } ) <EOL> } <EOL> val unusedPatterns = checker . unusedMatchers ( ) <EOL> if ( unusedPatterns . isNotEmpty ( ) ) { <EOL> problems . add ( "<STR_LIT>" + unusedPatterns . joinToString ( "<STR_LIT:\n>" ) { "<STR_LIT>" } ) <EOL> } <EOL> if ( problems . isNotEmpty ( ) ) { <EOL> fail ( problems . joinToString ( "<STR_LIT:\n>" ) ) <EOL> } <EOL> }


{ <EOL> return "<STR_LIT>" <EOL> }