/* Ċ Ġ* ĠCopyright Ġ 2 0 1 0 - 2 0 1 6 ĠJetBrains Ġs . r . o . Ċ Ġ* Ċ Ġ* ĠLicensed Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ġ" License "); Ċ Ġ* Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ġwith Ġthe ĠLicense . Ċ Ġ* ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat Ċ Ġ* Ċ Ġ* Ġhttp :// www . apache . org / licenses / LICENSE - 2 . 0 Ċ Ġ* Ċ Ġ* ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware Ċ Ġ* Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , Ċ Ġ* ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . Ċ Ġ* ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand Ċ Ġ* Ġlimitations Ġunder Ġthe ĠLicense . Ċ Ġ*/ Ċ Ċ package Ġorg . jetbrains . kotlin . resolve . scopes . re ceiv ers Ċ Ċ import Ġorg . jetbrains . kotlin . descriptors . Declaration Descriptor Ċ import Ġorg . jetbrains . kotlin . resolve . scopes . Member Scope Ċ import Ġorg . jetbrains . kotlin . types . Kotlin Type Ċ import Ġorg . jetbrains . kotlin . types . checker .* Ċ Ċ // Ġthis Ġreceiver Ġused Ġonly Ġfor Ġresolution . Ġsee Ġsub types Ċ interface ĠD eta iled Receiver Ċ Ċ class ĠReceiver Value With Smart Cast Info ( ĊĠĠĠ Ġval Ġreceiver Value : ĠReceiver Value , ĊĠĠĠ Ġ/* ĊĠĠĠĠ Ġ* ĠIt Ġdoesn 't Ġinclude Ġreceiver . type Ġand Ġis Ġused Ġonly Ġto Ġspecial Ġmarking Ġsuch Ġtypes Ġ( e . g . Ġfor ĠIDE Ġgreen Ġhighlighting ) ĊĠĠĠĠ Ġ* Ġbut Ġnot Ġto Ġconstruct Ġthe Ġresulting Ġtype ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġval Ġtypes From Smart Cast s : ĠSet < Kotlin Type >, ĊĠĠĠ Ġval Ġis Stable : ĠBoolean , ĊĠĠĠ Ġoriginal BaseType : ĠKotlin Type Ġ= Ġreceiver Value . type Ċ ) Ġ: ĠD eta iled Receiver Ġ{ ĊĠĠĠ Ġ// ĠIt 's Ġused Ġto Ġconstruct Ġthe Ġresulting Ġtype ĊĠĠĠ Ġval Ġall Original Types Ġ= Ġtypes From Smart Cast s Ġ+ Ġoriginal BaseType ĊĊĠĠĠ Ġfun Ġhas Types From Smart Cast s () Ġ= Ġtypes From Smart Cast s . isNotEmpty () ĊĊĠĠĠ Ġoverride Ġfun ĠtoString () Ġ= Ġreceiver Value . toString () Ċ } Ċ Ċ interface ĠQual ifier Receiver Ġ: ĠReceiver , ĠD eta iled Receiver Ġ{ ĊĠĠĠ Ġval Ġdescriptor : ĠDeclaration Descriptor ĊĊĠĠĠ Ġval Ġstatic Scope : ĠMember Scope ĊĊĠĠĠ Ġval Ġclass Value Receiver : ĠReceiver Value ? ĊĊĠĠĠ Ġ// Ġfor Ġqual ifiers Ġsmart Ġcast Ġis Ġimpossible ĊĠĠĠ Ġval Ġclass Value Receiver With Smart Cast Info : ĠReceiver Value With Smart Cast Info ? ĊĠĠĠĠĠĠĠ Ġget () Ġ= Ġclass Value Receiver ?. let Ġ{ ĠReceiver Value With Smart Cast Info ( it , Ġempty Set (), Ġtrue ) Ġ} Ċ } Ċ Ċ fun ĠReceiver Value With Smart Cast Info . prepare Receiver Reg arding Capture Types (): ĠReceiver Value With Smart Cast Info Ġ{ ĊĠĠĠ Ġval Ġprepared BaseType Ġ= Ġprepare Argument Type Reg arding Capture Types ( receiver Value . type . unwrap ()) Ġ?: Ġreturn Ġthis ĊĊĠĠĠ Ġreturn ĠReceiver Value With Smart Cast Info ( receiver Value . replace Type ( prepared BaseType ), Ġtypes From Smart Cast s , Ġis Stable , Ġreceiver Value . type ) Ċ } Ċ