Join Slack
Powered by
I am making a calculator type app where both types...
# getting-started
r
Ray Rahke
02/20/2024, 8:13 AM
I am making a calculator type app where both types of numbers need to be accepted and treated the same way
j
Javier
02/20/2024, 8:16 AM
Until unions are finished you can use sealed classes or sealed interfaces
y
Yannik Fuhrmeister
02/20/2024, 8:27 AM
You can take a look at the abstract Number class. See:
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-number/
Open in Slack
Previous
Next