what I meant is wether is there a way to alias it ...
# getting-started
u
what I meant is wether is there a way to alias it to void, i.e. no return value when that kotlin function is used in java
k
No, because in the end a function like
Copy code
fun <T> foo(block: () -> T) = block
should be able to return unit, and so the
Unit
instance needs to come from somewhere.
u
Yea I know, Unit is better since its a instance, but was hoping for some compiler magic
k
But what when java code calls this? The
Nothing
has to come from the Java code.