carbaj0
10/17/2022, 4:25 AMOption<S>
Since we are kotlin syntax friends, i wonder if isn´t possible to set/modify nullable typessimon.vergauwen
10/17/2022, 5:28 AMcarbaj0
10/17/2022, 7:06 AM@optics
data class Test(
val other: Option<String> = None
) {
companion object
}
@optics
data class Test2(
val other: String? = null
) {
companion object
}
fun main() {
val test2 = Test2()
Test2.other.modify(test2) { null } -> not compile
val test = Test()
Test.other.modify(test) { None }
}