Poko
Poko copied to clipboard
Automatically make properties without visibility explicitly public in FIR
With a data class, you declare the type public and all the properties become public even in explicit API mode.
public data class Auth(
val user: String,
val token: String,
)
However, change to @Poko and such a thing does not compile.
@Poko
public class Auth(
val user: String,
val token: String,
)
You have to explicitly mark each property as public. 😢
Since @Poko competes directly with data, I think it makes sense to try and replicate the behavior of not needing an explicit public.
And unlike data, you can still narrow the visibility of a property and have everything work Just Fine™.