Use proto flag to determine companion field moved to interface

This commit is contained in:
Mikhael Bogdanov
2018-07-16 13:34:55 +02:00
parent e00b7a993f
commit 5b8df2f6f2
3 changed files with 31 additions and 8 deletions
@@ -120,6 +120,7 @@ object JvmProtoBufUtil {
return if (type.hasClassName()) ClassMapperLite.mapClass(nameResolver.getQualifiedClassName(type.className)) else null
}
@JvmStatic
fun isMovedFromInterfaceCompanion(proto: ProtoBuf.Property) =
proto.getExtension(JvmProtoBuf.isMovedFromInterfaceCompanion).toInt().and(1) != 0
}