Hello everyone Can someone please explain me, what...
# getting-started
a
Hello everyone Can someone please explain me, what's wrong with the following code?
Copy code
class Credentials(val username = "", val token = "")
This produces the error:
A type annotation is required on a value parameter
. So I have to write it this way:
Copy code
class Credentials(val username: String = "", val token: String = "")
Why type inference cannot detect
String
type? Thank you