carbaj0
05/28/2024, 3:41 AMcarbaj0
05/28/2024, 4:09 AMcarbaj0
05/28/2024, 4:09 AMsimon.vergauwen
05/28/2024, 5:59 AMTextFieldState
annotated with @optics
as well?carbaj0
05/28/2024, 6:06 AMsimon.vergauwen
05/28/2024, 6:09 AMcarbaj0
05/28/2024, 6:09 AMsimon.vergauwen
05/28/2024, 6:10 AMnullableValue
doing? We're cleaning up the DSL for Optics a bit.simon.vergauwen
05/28/2024, 6:11 AMLens<Source, Focus?>
for nullable types, such that you can erase its value.
nonNull
is just to turn it into Optional<Source, Focus>
carbaj0
05/28/2024, 6:12 AMcarbaj0
05/28/2024, 6:29 AMcarbaj0
05/28/2024, 6:29 AMsimon.vergauwen
05/28/2024, 6:31 AM?
which is notNull
and takes you from Lens<S, A?>
to Optional<S, A>
. Not sure why that second screenshot is red underlined though. Guess we need to add some failing tests for these casees.Alejandro Serrano.Mena
05/28/2024, 7:13 AMT?
now generate Lens<A, T?>
instead of Optional<A, T>
, so you can set them back to non-nullable
as Simon mentioned, the fix is to use notNull
, which turns Lens<A, T?>
into Optional<A, T>
, if you need the 1.2.x behaviorcarbaj0
05/28/2024, 7:21 AMCourseState.level.notNull.name() set level.value.toString()
//setter
CourseState.level.setNullable(state , null)