K2: minor, remove misleading FirMemberDeclaration.containerSource

"Container source" means "the source of the container". So, if you
called this extension on a class (`FirClassLikeDeclaration`), it was
reasonable to assume that you would get the source of its _containing
class_, whereas the function actually returned the source of the class
itself.

Instead of inventing another name for this function, I've decided to
inline and remove it because it has only one usage.
This commit is contained in:
Alexander Udalov
2023-08-03 16:01:25 +02:00
committed by Space Team
parent 54a5f7d8f2
commit 1d5ade1166
2 changed files with 8 additions and 9 deletions
@@ -49,12 +49,6 @@ var <T> T.danglingTypeConstraints: List<DanglingTypeConstraint>?
// ----------------------------------- Utils -----------------------------------
val FirMemberDeclaration.containerSource: SourceElement?
get() = when (this) {
is FirCallableDeclaration -> containerSource
is FirClassLikeDeclaration -> sourceElement
}
val FirProperty.hasExplicitBackingField: Boolean
get() = backingField != null && backingField !is FirDefaultPropertyBackingField