我有一个my_unit
带有布尔字段的单元my_bool
。我需要在my_unit
when中添加一个特定的逻辑my_bool == FALSE
。可能吗?
unit my_unit {
my_bool : bool;
when my_bool {
// Works fine, I can add logic to my_unit
};
when not my_bool {
// This causes compilation error!!!
// Here I need to add another logic
};
};
有没有办法做到这一点?谢谢您的帮助