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:
committed by
Space Team
parent
54a5f7d8f2
commit
1d5ade1166
-6
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user