FIR: regard property accessor without body as FirDefaultPropertyAccessor

This commit is contained in:
Jinseong Jeon
2020-03-20 22:04:51 +03:00
committed by Mikhail Glukhikh
parent e26a3ad033
commit e46a4246d2
23 changed files with 67 additions and 36 deletions
@@ -49,6 +49,22 @@ abstract class FirDefaultPropertyAccessor(
final override var body: FirBlock?
get() = null
set(_) {}
companion object {
fun createGetterOrSetter(
source: FirSourceElement?,
session: FirSession,
propertyTypeRef: FirTypeRef,
visibility: Visibility,
isGetter: Boolean
): FirDefaultPropertyAccessor {
return if (isGetter) {
FirDefaultPropertyGetter(source, session, propertyTypeRef, visibility)
} else {
FirDefaultPropertySetter(source, session, propertyTypeRef, visibility)
}
}
}
}
class FirDefaultPropertyGetter(