https://kotlinlang.org logo
#compiler
Title
# compiler
a

Alexander Maryanovsky

05/17/2022, 7:43 AM
Funny case where whitespace between tokens makes a difference. This compiles:
Copy code
typealias ComposableFunction = @Composable (value: Int) -> Unit
but this doesn’t:
Copy code
typealias ComposableFunction = @Composable(value: Int) -> Unit
e

ephemient

05/17/2022, 8:06 AM
more fun:
Copy code
typealias A = @Suppress () -> Unit // OK
typealias B = @Suppress() () -> Unit // OK
typealias C = @Suppress () () -> Unit // OK
typealias D = @Suppress() -> Unit // not OK
2 Views