Kotlin Discussions
In Kotlin, can a function return either String or Int?
Support
jstuyts
February 20, 2020, 11:43am
2
See this thread for the discussion about union types:
Union types
1 Like
show post in topic
Related topics
Topic
Replies
Views
Activity
Implementing an alternative to union types
1
182
August 20, 2024
Is it possible to declare a variable with two types in Kotlin, like val x: Int or String?
Language Design
4
23355
February 10, 2021
Union types
Language Design
133
121621
March 14, 2025
Multiple types like in TypeScript
Language Design
10
10917
June 23, 2020
Kotlin Feedback After Project
Language Design
6
1596
April 20, 2017