merge method
- CheckedState other
Semanitcs nodes will only be merged when they are not in conflict.
Implementation
CheckedState merge(CheckedState other) {
if (this == CheckedState.mixed || other == CheckedState.mixed) {
return CheckedState.mixed;
}
if (this == CheckedState.isTrue || other == CheckedState.isTrue) {
return CheckedState.isTrue;
}
if (this == CheckedState.isFalse || other == CheckedState.isFalse) {
return CheckedState.isFalse;
}
return CheckedState.none;
}