Skip to content

Instantly share code, notes, and snippets.

@tfcporciuncula
Created March 8, 2023 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tfcporciuncula/40bfaf8229609ea39db81ad16b484ac1 to your computer and use it in GitHub Desktop.
Save tfcporciuncula/40bfaf8229609ea39db81ad16b484ac1 to your computer and use it in GitHub Desktop.
- typealias SpecialGreeting1 = String
- typealias SpecialGreeting2 = String
+ @JvmInline value class SpecialGreeting1(val value: String)
+ @JvmInline value class SpecialGreeting2(val value: String)
...
- fun provideSpecialGreeting1(): SpecialGreeting1 = "Heeeeey"
+ fun provideSpecialGreeting1(): SpecialGreeting1 = SpecialGreeting1("Heeeeey")
...
- platformGreeter().greet(finalGreeting = specialGreeting1)
+ platformGreeter().greet(finalGreeting = specialGreeting1.value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment