Colton Idle
08/11/2025, 1:28 PMRob Elliot
08/11/2025, 1:45 PMjoseph_ivie
08/11/2025, 2:30 PMColton Idle
08/11/2025, 2:31 PMRob Elliot
08/11/2025, 2:33 PMRob Elliot
08/11/2025, 2:33 PMjoseph_ivie
08/11/2025, 2:35 PMChris Lee
08/11/2025, 2:44 PMRiccardo Lippolis
08/11/2025, 2:53 PM@ConsistentCopyVisibility
annotation on the data class, or setting the -Xconsistent-data-class-copy-visibility
compiler flag. This will make sure the copy
function of the data class also has the private visibility. Otherwise, it would still be possible to create 'invalid' data class instances using that copy
function, which is public by default.
(in future versions (2.3?) the copy
function will automatically get the same visibility as the primary constructor, see: https://youtrack.jetbrains.com/issue/KT-11914/Confusing-data-class-copy-with-private-constructor)Chris Lee
08/11/2025, 2:54 PMKlitos Kyriacou
08/11/2025, 4:41 PMEdgar Avuzi
08/12/2025, 2:10 AMEdgar Avuzi
08/12/2025, 2:13 AMEdgar Avuzi
08/12/2025, 2:18 AMdeeply nested static functions
is big - end up passing all the stuff manually through components (functions) - increases code rigidity and coupling