It seems I can use default on the declaration. What I cant do is call the function with the named parameters
03/08/2018, 5:21 AM
Thanks for the tip. Seems fine for the class. But not the case for a function. Expected declaration can’t have parameters with default value. If I do something like:
expect fun get (
params: Map<String, String>? = mapOf(“1” to “1"),
headers: Map<String, String>?
) : Map<String, *>
03/08/2018, 5:39 AM
Sorry, I didn't understand very much why this could cause problems. Could I ask you how?
03/08/2018, 10:48 AM
If I can’t set the default value, then for some cases, I always needs to pass the explicitly. Which is verbose.