Join Slack
Powered by
`thingy?.let { Foo(it) } ?: Foo(defaultThingy, add...
# getting-started
k
karelpeeters
12/07/2017, 5:33 PM
thingy?.let { Foo(it) } ?: Foo(defaultThingy, additionalParam)
i
ilya.gorbunov
12/07/2017, 10:16 PM
Note that it's equivalent only if `Foo`'s return type is non nullable
@Hugh
👍 1
k
karelpeeters
12/07/2017, 10:17 PM
Ah I assumed
Foo
would be a constructor or factory method.
👍 1
h
Hugh
12/07/2017, 11:54 PM
Thanks guys, yep it's a constructor!
4
Views
Open in Slack
Previous
Next