Accessing the EncoderDecoder.Config always requires a cast because there is no type specified for EncoderDecoder. This also occurs within a Feed now that #70 made EncoderDecoder.Feed.config public.
public sealed class Decoder<C: EncoderDecoder.Config>(public val config: C) {
public abstract fun newDecoderFeed(out: OutFeed): Decoder<C>.Feed
public inner class Feed: EncoderDecoder.Feed<C>(config) {
// ...
}
// ...
}
public sealed class Encoder<C: EncoderDecoder.Config>(config: C): Decoder(config) {
public abstract fun newEncoderFeed(out: OutFeed): Encoder<C>.Feed
public inner class Feed: EncoderDecoder.Feed<C>(config) {
// ...
}
// ...
}
public abstract class EncoderDecoder<C: Config>(config: C): Encoder(config) {
public abstract class Config(
// ...
) {
// ...
}
public sealed class Feed<C: Config>(public val config: C) {
// ...
}
}
Need to think on this more because it affects user experience with the library. NOT doing it and requiring a cast all the time also affects user experience... so could go both ways.
Accessing the
EncoderDecoder.Config
always requires a cast because there is no type specified forEncoderDecoder
. This also occurs within aFeed
now that #70 madeEncoderDecoder.Feed.config
public.Need to think on this more because it affects user experience with the library. NOT doing it and requiring a cast all the time also affects user experience... so could go both ways.