https://kotlinlang.org logo
m

Marc Knaup

07/25/2020, 9:56 AM
Why is this internal?
someLong.toIntOrNull()
would be nice if the value is out of range
e

elizarov

07/25/2020, 5:06 PM
#stdlib would be great to know what’s your use-case for it?
m

Marc Knaup

07/25/2020, 7:32 PM
I use it for value transformation in my GraphQL library. Accept if it’s Int-compatible, reject otherwise. I’ve basically copied the internal implementation of stdlib.