Use direct field access to trivial class properties
#KT-3845 Fixed
This commit is contained in:
@@ -273,7 +273,7 @@ public class JvmCodegenUtil {
|
||||
if (accessor == null) return true;
|
||||
|
||||
// If the accessor is non-default (i.e. it has some code) we should call that accessor and not use direct access
|
||||
if (!accessor.isDefault()) return false;
|
||||
if (accessor.hasBody()) return false;
|
||||
|
||||
// If the accessor is private or final, it can't be overridden in the subclass and thus we can use direct access
|
||||
return property.getVisibility() == Visibilities.PRIVATE || accessor.getModality() == FINAL;
|
||||
|
||||
Reference in New Issue
Block a user