The Kotlin compiler is complaining about this func...
# getting-started
t
The Kotlin compiler is complaining about this function signature:
Copy code
fun snapDelta(delta: Duration, pixelSize: Duration, snapAnchors:SortedSet<Duration>, vararg targets: Duration): Duration
Duration is the kotlin.time.Duration. It says
Forbidden vararg parameter type: Duration
. I can't find an explanation for why its forbidden in the docs (https://kotlinlang.org/docs/functions.html#variable-number-of-arguments-varargs)
f
it might be because
Duration
is a
value
class
f
I was just about to paste the same
t
interesting, thanks
complexity breeds complexity 😄
109 Views