https://kotlinlang.org logo
Title
d

diesieben07

11/09/2017, 9:05 AM
@dragas Can you show the whole file?
d

dragas

11/09/2017, 9:09 AM
https://pastebin.com/BDEN8MZC It's just a regular rate limiter for Discord API based on OkHTTP interceptors
Seems to work when you remove
protected
modifier from
Limit
d

diesieben07

11/09/2017, 9:22 AM
If
Limit
is
protected
, only subclasses of
RateLimitInterceptor
can use it. If the
companion object
has a
protected
val
with type
Limit
"subclasses of the companion object" (there is no such thing of course) would be able to use that
val
, but then not be able to use
Limit
, because they cannot be a subclass of
RateLimitInterceptor
. I think that's what's going on.
d

dragas

11/09/2017, 9:43 AM
Eh, I guess I'll just expose it and leave it at that.
i

ilya.gorbunov

11/09/2017, 8:18 PM
Interesting issue, I've reported it https://youtrack.jetbrains.com/issue/KT-21176