package Ġarrow . meta . plugins . pro ofs . ph ases . resolve Ċ Ċ import Ġarrow . meta . ph ases . resolve . base Line Type Checker Ċ import Ġarrow . meta . plugins . pro ofs . ph ases . Given Proof Ċ import Ġarrow . meta . plugins . pro ofs . ph ases . Proof Ċ import Ġorg . jetbrains . kotlin . com . intellij . lang . AST Node Ċ import Ġorg . jetbrains . kotlin . config . Language Feature Ċ import Ġorg . jetbrains . kotlin . config . Language Version Settings Impl Ċ import Ġorg . jetbrains . kotlin . psi . Call Ċ import Ġorg . jetbrains . kotlin . psi . Kt Element Ċ import Ġorg . jetbrains . kotlin . psi . Kt Expression Ċ import Ġorg . jetbrains . kotlin . psi . Kt Type ArgumentList Ċ import Ġorg . jetbrains . kotlin . psi . Kt Type Projection Ċ import Ġorg . jetbrains . kotlin . psi . Kt Value ArgumentList Ċ import Ġorg . jetbrains . kotlin . psi . Lambda Argument Ċ import Ġorg . jetbrains . kotlin . psi . Value Argument Ċ import Ġorg . jetbrains . kotlin . resolve . Binding Trace Context Ċ import Ġorg . jetbrains . kotlin . resolve . calls . components . Callable Reference Resolver Ċ import Ġorg . jetbrains . kotlin . resolve . calls . components . Inference Session Ċ import Ġorg . jetbrains . kotlin . resolve . calls . components . Kotlin Call Comp leter Ċ import Ġorg . jetbrains . kotlin . resolve . calls . components . Kotlin Resolution Callbacks Ċ import Ġorg . jetbrains . kotlin . resolve . calls . components . New Over loading Conflict Resolver Ċ import Ġorg . jetbrains . kotlin . resolve . calls . context . Basic Call Resolution Context Ċ import Ġorg . jetbrains . kotlin . resolve . calls . context . Check Argument Types Mode Ċ import Ġorg . jetbrains . kotlin . resolve . calls . model . Call Resolution Result Ċ import Ġorg . jetbrains . kotlin . resolve . calls . model . Kotlin Call Ċ import Ġorg . jetbrains . kotlin . resolve . calls . model . Kotlin Call Components Ċ import Ġorg . jetbrains . kotlin . resolve . calls . model . Kotlin Resolution Candidate Ċ import Ġorg . jetbrains . kotlin . resolve . calls . model . Simple Candidate Factory Ċ import Ġorg . jetbrains . kotlin . resolve . calls . model . check Call In variants Ċ import Ġorg . jetbrains . kotlin . resolve . calls . model . fresh ReturnType Ċ import Ġorg . jetbrains . kotlin . resolve . calls . smart casts . Data Flow Info Ċ import Ġorg . jetbrains . kotlin . resolve . calls . smart casts . Data Flow Value Factory Impl Ċ import Ġorg . jetbrains . kotlin . resolve . calls . tasks . Explicit Receiver Kind Ċ import Ġorg . jetbrains . kotlin . resolve . calls . tower . Candidate With Bound Dispatch Receiver Ċ import Ġorg . jetbrains . kotlin . resolve . calls . tower . Implicit Scope Tower Ċ import Ġorg . jetbrains . kotlin . resolve . calls . tower . Known Result Processor Ċ import Ġorg . jetbrains . kotlin . resolve . calls . tower . PS IC all Resolver Ċ import Ġorg . jetbrains . kotlin . resolve . calls . tower . Tower Resolver Ċ import Ġorg . jetbrains . kotlin . resolve . calls . tower . force Resolution Ċ import Ġorg . jetbrains . kotlin . resolve . calls . tower . is Synt hesized Ċ import Ġorg . jetbrains . kotlin . resolve . scopes . re ceiv ers . Receiver Ċ import Ġorg . jetbrains . kotlin . resolve . scopes . re ceiv ers . Receiver Value Ċ import Ġorg . jetbrains . kotlin . resolve . scopes . re ceiv ers . Receiver Value With Smart Cast Info Ċ import Ġorg . jetbrains . kotlin . types . Un wrapped Type Ċ import Ġorg . jetbrains . kotlin . types . expressions . Expression Typing Context Ċ Ċ class ĠPro ofs Call Resolver ( ĊĠ Ġprivate Ġval Ġto wer Resolver : ĠT ower Resolver , ĊĠ Ġprivate Ġval Ġkotlin Call Comp leter : ĠKotlin Call Comp leter , ĊĠ Ġprivate Ġval Ġover loading Conflict Resolver : ĠNew Over loading Conflict Resolver , ĊĠ Ġprivate Ġval Ġcallable Reference Resolver : ĠCallable Reference Resolver , ĊĠ Ġprivate Ġval Ġcall Components : ĠKotlin Call Components , ĊĠ Ġprivate Ġval Ġpsi Call Resolver : ĠPS IC all Resolver Ċ ) Ġ{ ĊĊĠ Ġfun ĠList < Proof >. resolve Candidates ( ĊĠĠĠ Ġscope Tower : ĠImp licit Scope Tower , ĊĠĠĠ Ġkotlin Call : ĠKotlin Call , ĊĠĠĠ Ġexpected Type : ĠUn wrapped Type , ĊĠĠĠ Ġcollect All Candidates : ĠBoolean , ĊĠĠĠ Ġextension Receiver : ĠReceiver Value With Smart Cast Info ? ĊĠ Ġ): ĠCall Resolution Result Ġ{ ĊĠĠĠ Ġkotlin Call . check Call In variants () ĊĠĠĠ Ġval Ġtrace Ġ= ĠBinding Trace Context . create Trace able Binding Trace () ĊĠĠĠ Ġval Ġcontext Ġ= ĊĠĠĠĠĠ ĠExpression Typing Context . new Context ( ĊĠĠĠĠĠĠĠ Ġtrace , ĊĠĠĠĠĠĠĠ Ġscope Tower . lexical Scope , ĊĠĠĠĠĠĠĠ ĠData Flow Info . EMPTY , ĊĠĠĠĠĠĠĠ Ġexpected Type , ĊĠĠĠĠĠĠĠ ĠLanguage Version Settings Impl . DEFAULT , ĊĠĠĠĠĠĠĠ ĠData Flow Value Factory Impl ( Language Version Settings Impl . DEFAULT ) ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġval Ġfake Call Ġ= ĊĠĠĠĠĠ Ġobject Ġ: ĠCall Ġ{ ĊĠĠĠĠĠĠĠ Ġoverride Ġfun Ġget Call Operation Node (): ĠAST Node ? Ġ= Ġnull ĊĠĠĠĠĠĠĠ Ġoverride Ġfun Ġget Explicit Receiver (): ĠReceiver ? Ġ= Ġnull ĊĠĠĠĠĠĠĠ Ġoverride Ġfun Ġget Dispatch Receiver (): ĠReceiver Value ? Ġ= Ġnull ĊĠĠĠĠĠĠĠ Ġoverride Ġfun Ġget Cal lee Expression (): ĠK t Expression ? Ġ= Ġnull ĊĠĠĠĠĠĠĠ Ġoverride Ġfun ĠgetValue ArgumentList (): ĠK t Value ArgumentList ? Ġ= Ġnull ĊĠĠĠĠĠĠĠ Ġoverride Ġfun ĠgetValue Arguments (): ĠList < Value Argument > Ġ= Ġempty List () ĊĠĠĠĠĠĠĠ Ġoverride Ġfun Ġget Function Literal Arguments (): ĠList < Lambda Argument > Ġ= Ġempty List () ĊĠĠĠĠĠĠĠ Ġoverride Ġfun ĠgetType Arguments (): ĠList < Kt Type Projection > Ġ= Ġempty List () ĊĠĠĠĠĠĠĠ Ġoverride Ġfun ĠgetType ArgumentList (): ĠK t Type ArgumentList ? Ġ= Ġnull ĊĠĠĠĠĠĠĠ Ġoverride Ġfun Ġget Call Element (): ĠK t Element Ġ= ĊĠĠĠĠĠĠĠĠĠ Ġthrow ĠIllegalStateException (" this Ġis Ġa Ġfake Ġcall Ġelement ") ĊĠĠĠĠĠĠĠ Ġoverride Ġfun Ġget Call Type (): ĠCall . Call Type Ġ= ĠCall . Call Type . DEFAULT ĊĠĠĠĠĠ Ġ} ĊĠĠĠ Ġval Ġbasic Call Context Ġ= ĊĠĠĠĠĠ ĠBasic Call Resolution Context . create ( ĊĠĠĠĠĠĠĠ Ġcontext , ĊĠĠĠĠĠĠĠ Ġfake Call , ĊĠĠĠĠĠĠĠ ĠCheck Argument Types Mode . CHECK _ VALUE _ ARGUMENT S ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġval Ġresolution Callbacks Ġ= ĊĠĠĠĠĠ Ġpsi Call Resolver . create Resolution Callbacks ( trace , ĠInference Session . default , Ġbasic Call Context ) ĊĠĠĠ Ġval Ġcandidate Factory Ġ= ĊĠĠĠĠĠ ĠSimple Candidate Factory ( ĊĠĠĠĠĠĠĠ Ġcall Components , ĊĠĠĠĠĠĠĠ Ġscope Tower , ĊĠĠĠĠĠĠĠ Ġkotlin Call , ĊĠĠĠĠĠĠĠ Ġresolution Callbacks , ĊĠĠĠĠĠĠĠ Ġcallable Reference Resolver ĊĠĠĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġresolution Candidates Ġ= Ġmap Ġ{ ĊĠĠĠĠĠ Ġit . fold ( ĊĠĠĠĠĠĠĠĠĠ Ġgiven Ġ= Ġ{ Ġgiven Candidate ( candidate Factory ) Ġ}, ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ. force Resolution () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġif Ġ( collect All Candidates ) Ġ{ ĊĠĠĠĠĠ Ġval Ġall Candidates Ġ= ĊĠĠĠĠĠĠĠ Ġto wer Resolver . run With Empty Tower Data ( ĊĠĠĠĠĠĠĠĠĠ ĠKnown Result Processor ( resolution Candidates ), ĊĠĠĠĠĠĠĠĠĠ ĠT ower Resolver . All Candidates Collector (), ĊĠĠĠĠĠĠĠĠĠ Ġuse Order Ġ= Ġfalse ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠ Ġreturn Ġkotlin Call Comp leter . create All Candidates Result ( ĊĠĠĠĠĠĠĠ Ġall Candidates , ĊĠĠĠĠĠĠĠ Ġexpected Type , ĊĠĠĠĠĠĠĠ Ġresolution Callbacks ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĠĠĠ Ġval Ġcandidates Ġ= ĊĠĠĠĠĠ Ġto wer Resolver . run With Empty Tower Data ( ĊĠĠĠĠĠĠĠ ĠKnown Result Processor ( resolution Candidates ), ĊĠĠĠĠĠĠĠ ĠT ower Resolver . Successful Result Collector (), ĊĠĠĠĠĠĠĠ Ġuse Order Ġ= Ġtrue ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġreturn Ġchose Most Specific ( candidate Factory , Ġresolution Callbacks , Ġexpected Type , Ġcandidates ) ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun ĠGiven Proof . given Candidate ( ĊĠĠĠ Ġcandidate Factory : ĠSimple Candidate Factory ĊĠ Ġ): ĠKotlin Resolution Candidate Ġ= ĊĠĠĠ Ġcandidate Factory . create Candidate ( ĊĠĠĠĠĠ Ġto wer Candidate Ġ= ĠC andidate With Bound Dispatch Receiver ( null , Ġcallable Descriptor , Ġempty List ()), ĊĠĠĠĠĠ Ġexplicit Receiver Kind Ġ= ĠExplicit Receiver Kind . NO _ EX PL IC IT _ RECE IVER , ĊĠĠĠĠĠ Ġextension Receiver Ġ= Ġnull ĊĠĠĠ Ġ) ĊĊĠ Ġprivate Ġfun Ġchose Most Specific ( ĊĠĠĠ Ġcandidate Factory : ĠSimple Candidate Factory , ĊĠĠĠ Ġresolution Callbacks : ĠKotlin Resolution Callbacks , ĊĠĠĠ Ġexpected Type : ĠUn wrapped Type ?, ĊĠĠĠ Ġcandidates : ĠCollection < Kotlin Resolution Candidate > ĊĠ Ġ): ĠCall Resolution Result Ġ{ ĊĠĠĠ Ġvar Ġref ined Candidates Ġ= ĊĠĠĠĠĠ Ġcandidates . filter Ġ{ ĊĠĠĠĠĠĠĠ Ġit . resolved Call . fresh ReturnType ?. let Ġ{ Ġa Ġ-> ĊĠĠĠĠĠĠĠĠĠ Ġexpected Type ?. let Ġ{ Ġb Ġ-> Ġbase Line Type Checker . is Subtype Of ( a , Ġb ) Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠ Ġ?: Ġfalse ĊĠĠĠĠĠ Ġ} ĊĠĠĠ Ġif Ġ(! call Components . language Version Settings . supports Feature ( ĊĠĠĠĠĠĠĠ ĠLanguage Feature . Ref ined Sam Adapters Priority ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ) Ġ{ ĊĠĠĠĠĠ Ġval Ġnon Synt hesized Ġ= Ġcandidates . filter Ġ{ Ġ! it . resolved Call . candidate Descriptor . is Synt hesized Ġ} ĊĠĠĠĠĠ Ġif Ġ( non Synt hesized . isNotEmpty ()) Ġ{ ĊĠĠĠĠĠĠĠ Ġref ined Candidates Ġ= Ġnon Synt hesized ĊĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġval Ġmaxim ally Specific Candidates Ġ= ĊĠĠĠĠĠ Ġover loading Conflict Resolver . choose Max im ally Specific Candidates ( ĊĠĠĠĠĠĠĠ Ġref ined Candidates , ĊĠĠĠĠĠĠĠ ĠCheck Argument Types Mode . CHECK _ VALUE _ ARGUMENT S , ĊĠĠĠĠĠĠĠ Ġdis crimin ate Gener ics Ġ= Ġtrue ĊĠĠĠĠĠ Ġ) ĊĊĠĠĠ Ġreturn Ġkotlin Call Comp leter . run Completion ( ĊĠĠĠĠĠ Ġcandidate Factory , ĊĠĠĠĠĠ Ġmaxim ally Specific Candidates , ĊĠĠĠĠĠ Ġexpected Type , ĊĠĠĠĠĠ Ġresolution Callbacks ĊĠĠĠ Ġ) ĊĠ Ġ} Ċ } Ċ