package Ġorg . jetbrains . du kat . model . common Lower ings Ċ Ċ import Ġorg . jetbrains . du kat . ast Model . Class Like Model Ċ import Ġorg . jetbrains . du kat . ast Model . Module Model Ċ import Ġorg . jetbrains . du kat . ast Model . Source Set Model Ċ import Ġorg . jetbrains . du kat . to pos ort . Graph Ċ import Ġorg . jetbrains . du kat . model . common Lower ings . overrides . Inheritance Context Ċ Ċ class ĠModel Context Aware Lower ing ( private Ġval Ġtranslation Context : ĠTranslation Context ) Ġ: ĠModel Lower ing Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġlower ( module : ĠModule Model ): ĠModule Model Ġ= Ġmodule ĊĊĠĠĠ Ġoverride Ġfun Ġlower ( source : ĠSource Set Model ): ĠSource Set Model Ġ{ ĊĠĠĠĠĠĠĠ Ġtranslation Context . init Model Context ( Model Context ( source )) ĊĠĠĠĠĠĠĠ Ġtranslation Context . init Inheritance Context ( Inheritance Context ( translation Context . model Context . build Inheritance Graph ())) ĊĠĠĠĠĠĠĠ Ġreturn Ġsuper . lower ( source ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun ĠModel Context . build Inheritance Graph (): ĠGraph < Class Like Model > Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġgraph Ġ= ĠGraph < Class Like Model >() ĊĊĠĠĠĠĠĠĠ ĠgetClass Like Iterable (). forEach Ġ{ Ġclass Like Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ ĠgetAll Parents ( class Like ). forEach Ġ{ Ġresolved Class Like Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġgraph . add Edge ( class Like , Ġresolved Class Like . class Like ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġreturn Ġgraph ĊĠĠĠ Ġ} Ċ }