scottiedog45
10/22/2019, 5:03 PMdata class Foo(val a: String) {
init {
//magic that takes string and sets it to a
}
}
var Bar : Foo = "b"
Shawn
10/22/2019, 5:06 PMfun String.asFoo() = Foo(this)
val bar = "b".asFoo()
scottiedog45
10/22/2019, 5:09 PMShawn
10/22/2019, 5:11 PMExpressibleByStringLiteral
scottiedog45
10/22/2019, 5:16 PMShawn
10/22/2019, 5:26 PMscottiedog45
10/22/2019, 5:27 PM