/* Ċ Ġ* ĠCopyright Ġ 2 0 0 0 - 2 0 1 8 ĠJetBrains Ġs . r . o . Ġand ĠKotlin ĠProgramming ĠLanguage Ġcontributors . Ċ Ġ* ĠUse Ġof Ġthis Ġsource Ġcode Ġis Ġgoverned Ġby Ġthe ĠApache Ġ 2 . 0 Ġlicense Ġthat Ġcan Ġbe Ġfound Ġin Ġthe Ġlicense / LICENSE . txt Ġfile . Ċ Ġ*/ Ċ Ċ package Ġorg . jetbrains . kotlin . resolve Ċ Ċ import Ġorg . jetbrains . kotlin . descriptors .* Ċ import Ġorg . jetbrains . kotlin . name . Fq Name Ċ import Ġorg . jetbrains . kotlin . types .* Ċ import Ġorg . jetbrains . kotlin . utils . addTo Std lib . safe As Ċ Ċ val ĠJVM _ INLINE _ AN NOT ATION _ FQ _ NAME Ġ= ĠF q Name (" kotlin . jvm . Jvm Inline ") Ċ Ċ // ĠFIXME : ĠDeserial ized Class Descriptor Ġin Ġreflection Ġdo Ġnot Ġhave Ġ@ Jvm Inline Ġannotation , Ġthat Ġwe Ċ // ĠFIXME : Ġwould Ġlike Ġto Ġcheck Ġas Ġwell . Ċ fun ĠDeclaration Descriptor . is Inline Class (): ĠBoolean Ġ= Ġthis Ġis ĠClass Descriptor Ġ&& Ġ( is Inline Ġ|| Ġis Value ) Ċ Ċ fun ĠKotlin Type . un subst it uted Under lying Type (): ĠKotlin Type ? Ġ= ĊĠĠĠ Ġconstructor . declaration Descriptor . safe As < Class Descriptor >() ?. inline Class Representation ?. underlying Type Ċ Ċ fun ĠKotlin Type . is Inline ClassType (): ĠBoolean Ġ= Ġconstructor . declaration Descriptor ?. is Inline Class () Ġ?: Ġfalse Ċ Ċ fun ĠKotlin Type . subst it uted Under lying Type (): ĠKotlin Type ? Ġ= ĊĠĠĠ Ġun subst it uted Under lying Type ()?. let Ġ{ ĠType Subst it utor . create ( this ). substitute ( it , ĠVari ance . IN VARIANT ) Ġ} Ċ Ċ fun ĠKotlin Type . is Recursive Inline ClassType (): ĠBoolean Ġ= ĊĠĠĠ Ġis Recursive Inline ClassType Inner ( hash Set Of ()) Ċ Ċ private Ġfun ĠKotlin Type . is Recursive Inline ClassType Inner ( visited : ĠHashSet < Classifier Descriptor >): ĠBoolean Ġ{ ĊĠĠĠ Ġval Ġdescriptor Ġ= Ġconstructor . declaration Descriptor ?. original Ġ?: Ġreturn Ġfalse ĊĊĠĠĠ Ġif Ġ(! visited . add ( descriptor )) Ġreturn Ġtrue ĊĊĠĠĠ Ġreturn Ġwhen Ġ( descriptor ) Ġ{ ĊĠĠĠĠĠĠĠ Ġis ĠClass Descriptor Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdescriptor . is Inline Class () Ġ&& ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġun subst it uted Under lying Type ()?. is Recursive Inline ClassType Inner ( visited ) Ġ== Ġtrue ĊĊĠĠĠĠĠĠĠ Ġis ĠType Parameter Descriptor Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdescriptor . upper Bounds . any Ġ{ Ġit . is Recursive Inline ClassType Inner ( visited ) Ġ} ĊĊĠĠĠĠĠĠĠ Ġelse Ġ-> Ġfalse ĊĠĠĠ Ġ} Ċ } Ċ Ċ fun ĠKotlin Type . is Nullable Under lying Type (): ĠBoolean Ġ{ ĊĠĠĠ Ġif Ġ(! is Inline ClassType ()) Ġreturn Ġfalse ĊĠĠĠ Ġval Ġunderlying Type Ġ= Ġun subst it uted Under lying Type () Ġ?: Ġreturn Ġfalse ĊĊĠĠĠ Ġreturn ĠType Utils . is Nullable Type ( underlying Type ) Ċ } Ċ Ċ fun ĠCallable Descriptor . is Getter Of Under lying Property Of Inline Class () Ġ= ĊĠĠĠ Ġthis Ġis ĠProperty Getter Descriptor Ġ&& Ġcorresponding Property . is Under lying Property Of Inline Class () Ċ Ċ fun ĠVariable Descriptor . is Under lying Property Of Inline Class (): ĠBoolean Ġ= ĊĠĠĠ Ġextension Receiver Parameter Ġ== Ġnull Ġ&& ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ( containing Declaration Ġas ? ĠClass Descriptor )?. inline Class Representation ?. underlying PropertyName Ġ== Ġthis . name Ċ