/* Ċ Ġ* ĠCopyright Ġ 2 0 1 0 - 2 0 2 1 Ġ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 . diagnostics Ċ Ċ import Ġcom . intellij . psi . Psi Element Ċ import Ġorg . jetbrains . kotlin . config . Language Feature Ċ import Ġkotlin . properties . ReadOnly Property Ċ import Ġkotlin . reflect . K Class Ċ import Ġkotlin . reflect . K Property Ċ Ċ inline Ġfun Ġ< re ified ĠP Ġ: ĠPsi Element > Ġwarning 0 ( ĊĠĠĠ Ġposition ing Strategy : ĠAbstract Source Element Position ing Strategy Ġ= ĠAbstract Source Element Position ing Strategy . DEFAULT Ċ ): ĠDiagnostic Factory 0 Delegate Provider Ġ{ ĊĠĠĠ Ġreturn ĠDiagnostic Factory 0 Delegate Provider ( Severity . WARNING , Ġposition ing Strategy , ĠP :: class ) Ċ } Ċ Ċ inline Ġfun Ġ< re ified ĠP Ġ: ĠPsi Element , ĠA > Ġwarning 1 ( ĊĠĠĠ Ġposition ing Strategy : ĠAbstract Source Element Position ing Strategy Ġ= ĠAbstract Source Element Position ing Strategy . DEFAULT Ċ ): ĠDiagnostic Factory 1 Delegate Provider < A > Ġ{ ĊĠĠĠ Ġreturn ĠDiagnostic Factory 1 Delegate Provider ( Severity . WARNING , Ġposition ing Strategy , ĠP :: class ) Ċ } Ċ Ċ inline Ġfun Ġ< re ified ĠP Ġ: ĠPsi Element , ĠA , ĠB > Ġwarning 2 ( ĊĠĠĠ Ġposition ing Strategy : ĠAbstract Source Element Position ing Strategy Ġ= ĠAbstract Source Element Position ing Strategy . DEFAULT Ċ ): ĠDiagnostic Factory 2 Delegate Provider < A , ĠB > Ġ{ ĊĠĠĠ Ġreturn ĠDiagnostic Factory 2 Delegate Provider ( Severity . WARNING , Ġposition ing Strategy , ĠP :: class ) Ċ } Ċ Ċ inline Ġfun Ġ< re ified ĠP Ġ: ĠPsi Element , ĠA , ĠB , ĠC > Ġwarning 3 ( ĊĠĠĠ Ġposition ing Strategy : ĠAbstract Source Element Position ing Strategy Ġ= ĠAbstract Source Element Position ing Strategy . DEFAULT Ċ ): ĠDiagnostic Factory 3 Delegate Provider < A , ĠB , ĠC > Ġ{ ĊĠĠĠ Ġreturn ĠDiagnostic Factory 3 Delegate Provider ( Severity . WARNING , Ġposition ing Strategy , ĠP :: class ) Ċ } Ċ Ċ inline Ġfun Ġ< re ified ĠP Ġ: ĠPsi Element , ĠA , ĠB , ĠC , ĠD > Ġwarning 4 ( ĊĠĠĠ Ġposition ing Strategy : ĠAbstract Source Element Position ing Strategy Ġ= ĠAbstract Source Element Position ing Strategy . DEFAULT Ċ ): ĠDiagnostic Factory 4 Delegate Provider < A , ĠB , ĠC , ĠD > Ġ{ ĊĠĠĠ Ġreturn ĠDiagnostic Factory 4 Delegate Provider ( Severity . WARNING , Ġposition ing Strategy , ĠP :: class ) Ċ } Ċ Ċ inline Ġfun Ġ< re ified ĠP Ġ: ĠPsi Element > Ġerror 0 ( ĊĠĠĠ Ġposition ing Strategy : ĠAbstract Source Element Position ing Strategy Ġ= ĠAbstract Source Element Position ing Strategy . DEFAULT Ċ ): ĠDiagnostic Factory 0 Delegate Provider Ġ{ ĊĠĠĠ Ġreturn ĠDiagnostic Factory 0 Delegate Provider ( Severity . ERROR , Ġposition ing Strategy , ĠP :: class ) Ċ } Ċ Ċ inline Ġfun Ġ< re ified ĠP Ġ: ĠPsi Element , ĠA > Ġerror 1 ( ĊĠĠĠ Ġposition ing Strategy : ĠAbstract Source Element Position ing Strategy Ġ= ĠAbstract Source Element Position ing Strategy . DEFAULT Ċ ): ĠDiagnostic Factory 1 Delegate Provider < A > Ġ{ ĊĠĠĠ Ġreturn ĠDiagnostic Factory 1 Delegate Provider ( Severity . ERROR , Ġposition ing Strategy , ĠP :: class ) Ċ } Ċ Ċ inline Ġfun Ġ< re ified ĠP Ġ: ĠPsi Element , ĠA , ĠB > Ġerror 2 ( ĊĠĠĠ Ġposition ing Strategy : ĠAbstract Source Element Position ing Strategy Ġ= ĠAbstract Source Element Position ing Strategy . DEFAULT Ċ ): ĠDiagnostic Factory 2 Delegate Provider < A , ĠB > Ġ{ ĊĠĠĠ Ġreturn ĠDiagnostic Factory 2 Delegate Provider ( Severity . ERROR , Ġposition ing Strategy , ĠP :: class ) Ċ } Ċ Ċ inline Ġfun Ġ< re ified ĠP Ġ: ĠPsi Element , ĠA , ĠB , ĠC > Ġerror 3 ( ĊĠĠĠ Ġposition ing Strategy : ĠAbstract Source Element Position ing Strategy Ġ= ĠAbstract Source Element Position ing Strategy . DEFAULT Ċ ): ĠDiagnostic Factory 3 Delegate Provider < A , ĠB , ĠC > Ġ{ ĊĠĠĠ Ġreturn ĠDiagnostic Factory 3 Delegate Provider ( Severity . ERROR , Ġposition ing Strategy , ĠP :: class ) Ċ } Ċ Ċ inline Ġfun Ġ< re ified ĠP Ġ: ĠPsi Element , ĠA , ĠB , ĠC , ĠD > Ġerror 4 ( ĊĠĠĠ Ġposition ing Strategy : ĠAbstract Source Element Position ing Strategy Ġ= ĠAbstract Source Element Position ing Strategy . DEFAULT Ċ ): ĠDiagnostic Factory 4 Delegate Provider < A , ĠB , ĠC , ĠD > Ġ{ ĊĠĠĠ Ġreturn ĠDiagnostic Factory 4 Delegate Provider ( Severity . ERROR , Ġposition ing Strategy , ĠP :: class ) Ċ } Ċ Ċ inline Ġfun Ġ< re ified ĠP Ġ: ĠPsi Element > Ġdeprecation Error 0 ( ĊĠĠĠ Ġfeature For Error : ĠLanguage Feature , ĊĠĠĠ Ġposition ing Strategy : ĠAbstract Source Element Position ing Strategy Ġ= ĠAbstract Source Element Position ing Strategy . DEFAULT Ċ ): ĠDeprec ation Diagnostic Factory 0 Delegate Provider Ġ{ ĊĠĠĠ Ġreturn ĠDeprec ation Diagnostic Factory 0 Delegate Provider ( feature For Error , Ġposition ing Strategy , ĠP :: class ) Ċ } Ċ Ċ inline Ġfun Ġ< re ified ĠP Ġ: ĠPsi Element , ĠA > Ġdeprecation Error 1 ( ĊĠĠĠ Ġfeature For Error : ĠLanguage Feature , ĊĠĠĠ Ġposition ing Strategy : ĠAbstract Source Element Position ing Strategy Ġ= ĠAbstract Source Element Position ing Strategy . DEFAULT Ċ ): ĠDeprec ation Diagnostic Factory 1 Delegate Provider < A > Ġ{ ĊĠĠĠ Ġreturn ĠDeprec ation Diagnostic Factory 1 Delegate Provider ( feature For Error , Ġposition ing Strategy , ĠP :: class ) Ċ } Ċ Ċ inline Ġfun Ġ< re ified ĠP Ġ: ĠPsi Element , ĠA , ĠB > Ġdeprecation Error 2 ( ĊĠĠĠ Ġfeature For Error : ĠLanguage Feature , ĊĠĠĠ Ġposition ing Strategy : ĠAbstract Source Element Position ing Strategy Ġ= ĠAbstract Source Element Position ing Strategy . DEFAULT Ċ ): ĠDeprec ation Diagnostic Factory 2 Delegate Provider < A , ĠB > Ġ{ ĊĠĠĠ Ġreturn ĠDeprec ation Diagnostic Factory 2 Delegate Provider ( feature For Error , Ġposition ing Strategy , ĠP :: class ) Ċ } Ċ Ċ inline Ġfun Ġ< re ified ĠP Ġ: ĠPsi Element , ĠA , ĠB , ĠC > Ġdeprecation Error 3 ( ĊĠĠĠ Ġfeature For Error : ĠLanguage Feature , ĊĠĠĠ Ġposition ing Strategy : ĠAbstract Source Element Position ing Strategy Ġ= ĠAbstract Source Element Position ing Strategy . DEFAULT Ċ ): ĠDeprec ation Diagnostic Factory 3 Delegate Provider < A , ĠB , ĠC > Ġ{ ĊĠĠĠ Ġreturn ĠDeprec ation Diagnostic Factory 3 Delegate Provider ( feature For Error , Ġposition ing Strategy , ĠP :: class ) Ċ } Ċ Ċ inline Ġfun Ġ< re ified ĠP Ġ: ĠPsi Element , ĠA , ĠB , ĠC , ĠD > Ġdeprecation Error 4 ( ĊĠĠĠ Ġfeature For Error : ĠLanguage Feature , ĊĠĠĠ Ġposition ing Strategy : ĠAbstract Source Element Position ing Strategy Ġ= ĠAbstract Source Element Position ing Strategy . DEFAULT Ċ ): ĠDeprec ation Diagnostic Factory 4 Delegate Provider < A , ĠB , ĠC , ĠD > Ġ{ ĊĠĠĠ Ġreturn ĠDeprec ation Diagnostic Factory 4 Delegate Provider ( feature For Error , Ġposition ing Strategy , ĠP :: class ) Ċ } Ċ Ċ // Ġ---------------- -------------- ĠPro viders Ġ---------------- -------------- Ċ Ċ class ĠDiagnostic Factory 0 Delegate Provider ( ĊĠĠĠ Ġprivate Ġval Ġseverity : ĠSeverity , ĊĠĠĠ Ġprivate Ġval Ġposition ing Strategy : ĠAbstract Source Element Position ing Strategy , ĊĠĠĠ Ġprivate Ġval Ġpsi Type : ĠK Class < *> Ċ ) Ġ{ ĊĠĠĠ Ġoperator Ġfun Ġprovide Delegate ( this Ref : ĠAny ?, Ġprop : ĠK Property < *> ): ĠReadOnly Property < Any ?, ĠK t Diagnostic Factory 0 > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠDummy Delegate ( Kt Diagnostic Factory 0 ( prop . name , Ġseverity , Ġposition ing Strategy , Ġpsi Type )) ĊĠĠĠ Ġ} Ċ } Ċ Ċ class ĠDiagnostic Factory 1 Delegate Provider < A >( ĊĠĠĠ Ġprivate Ġval Ġseverity : ĠSeverity , ĊĠĠĠ Ġprivate Ġval Ġposition ing Strategy : ĠAbstract Source Element Position ing Strategy , ĊĠĠĠ Ġprivate Ġval Ġpsi Type : ĠK Class < *> Ċ ) Ġ{ ĊĠĠĠ Ġoperator Ġfun Ġprovide Delegate ( this Ref : ĠAny ?, Ġprop : ĠK Property < *> ): ĠReadOnly Property < Any ?, ĠK t Diagnostic Factory 1 < A >> Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠDummy Delegate ( Kt Diagnostic Factory 1 ( prop . name , Ġseverity , Ġposition ing Strategy , Ġpsi Type )) ĊĠĠĠ Ġ} Ċ } Ċ Ċ class ĠDiagnostic Factory 2 Delegate Provider < A , ĠB >( ĊĠĠĠ Ġprivate Ġval Ġseverity : ĠSeverity , ĊĠĠĠ Ġprivate Ġval Ġposition ing Strategy : ĠAbstract Source Element Position ing Strategy , ĊĠĠĠ Ġprivate Ġval Ġpsi Type : ĠK Class < *> Ċ ) Ġ{ ĊĠĠĠ Ġoperator Ġfun Ġprovide Delegate ( this Ref : ĠAny ?, Ġprop : ĠK Property < *> ): ĠReadOnly Property < Any ?, ĠK t Diagnostic Factory 2 < A , ĠB >> Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠDummy Delegate ( Kt Diagnostic Factory 2 ( prop . name , Ġseverity , Ġposition ing Strategy , Ġpsi Type )) ĊĠĠĠ Ġ} Ċ } Ċ Ċ class ĠDiagnostic Factory 3 Delegate Provider < A , ĠB , ĠC >( ĊĠĠĠ Ġprivate Ġval Ġseverity : ĠSeverity , ĊĠĠĠ Ġprivate Ġval Ġposition ing Strategy : ĠAbstract Source Element Position ing Strategy , ĊĠĠĠ Ġprivate Ġval Ġpsi Type : ĠK Class < *> Ċ ) Ġ{ ĊĠĠĠ Ġoperator Ġfun Ġprovide Delegate ( this Ref : ĠAny ?, Ġprop : ĠK Property < *> ): ĠReadOnly Property < Any ?, ĠK t Diagnostic Factory 3 < A , ĠB , ĠC >> Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠDummy Delegate ( Kt Diagnostic Factory 3 ( prop . name , Ġseverity , Ġposition ing Strategy , Ġpsi Type )) ĊĠĠĠ Ġ} Ċ } Ċ Ċ class ĠDiagnostic Factory 4 Delegate Provider < A , ĠB , ĠC , ĠD >( ĊĠĠĠ Ġprivate Ġval Ġseverity : ĠSeverity , ĊĠĠĠ Ġprivate Ġval Ġposition ing Strategy : ĠAbstract Source Element Position ing Strategy , ĊĠĠĠ Ġprivate Ġval Ġpsi Type : ĠK Class < *> Ċ ) Ġ{ ĊĠĠĠ Ġoperator Ġfun Ġprovide Delegate ( this Ref : ĠAny ?, Ġprop : ĠK Property < *> ): ĠReadOnly Property < Any ?, ĠK t Diagnostic Factory 4 < A , ĠB , ĠC , ĠD >> Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠDummy Delegate ( Kt Diagnostic Factory 4 ( prop . name , Ġseverity , Ġposition ing Strategy , Ġpsi Type )) ĊĠĠĠ Ġ} Ċ } Ċ Ċ private Ġconst Ġval ĠWARNING Ġ= Ġ"_ WARNING " Ċ private Ġconst Ġval ĠERROR Ġ= Ġ"_ ERROR " Ċ Ċ class ĠDeprec ation Diagnostic Factory 0 Delegate Provider ( ĊĠĠĠ Ġprivate Ġval Ġfeature For Error : ĠLanguage Feature , ĊĠĠĠ Ġprivate Ġval Ġposition ing Strategy : ĠAbstract Source Element Position ing Strategy , ĊĠĠĠ Ġprivate Ġval Ġpsi Type : ĠK Class < *> Ċ ) Ġ{ ĊĠĠĠ Ġoperator Ġfun Ġprovide Delegate ( this Ref : ĠAny ?, Ġprop : ĠK Property < *> ): ĠReadOnly Property < Any ?, ĠK t Diagnostic Factory For De precation 0 > Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġerror Factory Ġ= ĠK t Diagnostic Factory 0 ("${ prop . name }$ ERROR ", ĠSeverity . ERROR , Ġposition ing Strategy , Ġpsi Type ) ĊĠĠĠĠĠĠĠ Ġval Ġwarning Factory Ġ= ĠK t Diagnostic Factory 0 ("${ prop . name }$ WARNING ", ĠSeverity . WARNING , Ġposition ing Strategy , Ġpsi Type ) ĊĠĠĠĠĠĠĠ Ġreturn ĠDummy Delegate ( Kt Diagnostic Factory For De precation 0 ( feature For Error , Ġwarning Factory , Ġerror Factory )) ĊĠĠĠ Ġ} Ċ } Ċ Ċ class ĠDeprec ation Diagnostic Factory 1 Delegate Provider < A >( ĊĠĠĠ Ġprivate Ġval Ġfeature For Error : ĠLanguage Feature , ĊĠĠĠ Ġprivate Ġval Ġposition ing Strategy : ĠAbstract Source Element Position ing Strategy , ĊĠĠĠ Ġprivate Ġval Ġpsi Type : ĠK Class < *> Ċ ) Ġ{ ĊĠĠĠ Ġoperator Ġfun Ġprovide Delegate ( this Ref : ĠAny ?, Ġprop : ĠK Property < *> ): ĠReadOnly Property < Any ?, ĠK t Diagnostic Factory For De precation 1 < A >> Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġerror Factory Ġ= ĠK t Diagnostic Factory 1 < A >(" ${ prop . name }$ ERROR ", ĠSeverity . ERROR , Ġposition ing Strategy , Ġpsi Type ) ĊĠĠĠĠĠĠĠ Ġval Ġwarning Factory Ġ= ĠK t Diagnostic Factory 1 < A >(" ${ prop . name }$ WARNING ", ĠSeverity . WARNING , Ġposition ing Strategy , Ġpsi Type ) ĊĠĠĠĠĠĠĠ Ġreturn ĠDummy Delegate ( Kt Diagnostic Factory For De precation 1 ( feature For Error , Ġwarning Factory , Ġerror Factory )) ĊĠĠĠ Ġ} Ċ } Ċ Ċ class ĠDeprec ation Diagnostic Factory 2 Delegate Provider < A , ĠB >( ĊĠĠĠ Ġprivate Ġval Ġfeature For Error : ĠLanguage Feature , ĊĠĠĠ Ġprivate Ġval Ġposition ing Strategy : ĠAbstract Source Element Position ing Strategy , ĊĠĠĠ Ġprivate Ġval Ġpsi Type : ĠK Class < *> Ċ ) Ġ{ ĊĠĠĠ Ġoperator Ġfun Ġprovide Delegate ( this Ref : ĠAny ?, Ġprop : ĠK Property < *> ): ĠReadOnly Property < Any ?, ĠK t Diagnostic Factory For De precation 2 < A , ĠB >> Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġerror Factory Ġ= ĠK t Diagnostic Factory 2 < A , ĠB >(" ${ prop . name }$ ERROR ", ĠSeverity . ERROR , Ġposition ing Strategy , Ġpsi Type ) ĊĠĠĠĠĠĠĠ Ġval Ġwarning Factory Ġ= ĠK t Diagnostic Factory 2 < A , ĠB >(" ${ prop . name }$ WARNING ", ĠSeverity . WARNING , Ġposition ing Strategy , Ġpsi Type ) ĊĠĠĠĠĠĠĠ Ġreturn ĠDummy Delegate ( Kt Diagnostic Factory For De precation 2 ( feature For Error , Ġwarning Factory , Ġerror Factory )) ĊĠĠĠ Ġ} Ċ } Ċ Ċ class ĠDeprec ation Diagnostic Factory 3 Delegate Provider < A , ĠB , ĠC >( ĊĠĠĠ Ġprivate Ġval Ġfeature For Error : ĠLanguage Feature , ĊĠĠĠ Ġprivate Ġval Ġposition ing Strategy : ĠAbstract Source Element Position ing Strategy , ĊĠĠĠ Ġprivate Ġval Ġpsi Type : ĠK Class < *> Ċ ) Ġ{ ĊĠĠĠ Ġoperator Ġfun Ġprovide Delegate ( this Ref : ĠAny ?, Ġprop : ĠK Property < *> ): ĠReadOnly Property < Any ?, ĠK t Diagnostic Factory For De precation 3 < A , ĠB , ĠC >> Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġerror Factory Ġ= ĠK t Diagnostic Factory 3 < A , ĠB , ĠC >(" ${ prop . name }$ ERROR ", ĠSeverity . ERROR , Ġposition ing Strategy , Ġpsi Type ) ĊĠĠĠĠĠĠĠ Ġval Ġwarning Factory Ġ= ĠK t Diagnostic Factory 3 < A , ĠB , ĠC >(" ${ prop . name }$ WARNING ", ĠSeverity . WARNING , Ġposition ing Strategy , Ġpsi Type ) ĊĠĠĠĠĠĠĠ Ġreturn ĠDummy Delegate ( Kt Diagnostic Factory For De precation 3 ( feature For Error , Ġwarning Factory , Ġerror Factory )) ĊĠĠĠ Ġ} Ċ } Ċ Ċ class ĠDeprec ation Diagnostic Factory 4 Delegate Provider < A , ĠB , ĠC , ĠD >( ĊĠĠĠ Ġprivate Ġval Ġfeature For Error : ĠLanguage Feature , ĊĠĠĠ Ġprivate Ġval Ġposition ing Strategy : ĠAbstract Source Element Position ing Strategy , ĊĠĠĠ Ġprivate Ġval Ġpsi Type : ĠK Class < *> Ċ ) Ġ{ ĊĠĠĠ Ġoperator Ġfun Ġprovide Delegate ( this Ref : ĠAny ?, Ġprop : ĠK Property < *> ): ĠReadOnly Property < Any ?, ĠK t Diagnostic Factory For De precation 4 < A , ĠB , ĠC , ĠD >> Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġerror Factory Ġ= ĠK t Diagnostic Factory 4 < A , ĠB , ĠC , ĠD >(" ${ prop . name }$ ERROR ", ĠSeverity . ERROR , Ġposition ing Strategy , Ġpsi Type ) ĊĠĠĠĠĠĠĠ Ġval Ġwarning Factory Ġ= ĠK t Diagnostic Factory 4 < A , ĠB , ĠC , ĠD >(" ${ prop . name }$ WARNING ", ĠSeverity . WARNING , Ġposition ing Strategy , Ġpsi Type ) ĊĠĠĠĠĠĠĠ Ġreturn ĠDummy Delegate ( Kt Diagnostic Factory For De precation 4 ( feature For Error , Ġwarning Factory , Ġerror Factory )) ĊĠĠĠ Ġ} Ċ } ĊĊ Ċ private Ġclass ĠDummy Delegate < T >( val Ġvalue : ĠT ) Ġ: ĠReadOnly Property < Any ?, ĠT > Ġ{ ĊĠĠĠ Ġoverride Ġfun ĠgetValue ( this Ref : ĠAny ?, Ġproperty : ĠK Property < *> ): ĠT Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġvalue ĊĠĠĠ Ġ} Ċ } Ċ