`val sPayload = payload?.let(::String)`
# announcements
j
val sPayload = payload?.let(::String)
👍 2
t
Type inference failed: inline fun <T, R> T.let(block: (T) -> R): R cannot be applied to receiver: ByteArray? arguments: (KFunction1<@ParameterName ByteArray, String>)
j
Are you sure you included the question mark?
t
Yeah I just copy pasted
j
bytes?.let { String(it) }
works. Maybe the new inference engine will allow the reference variant to work.
t
Faced the same issue today for other calls, what new inference engine? 🙂
t
Works. Thanks 🙂
k

https://www.youtube.com/watch?v=MyljSWm0Y_k

@Tolriq
t
Thanks found the video after posting 🙂 This looks really great 🙂