有没有办法让一个单独的对象被检查为确保separate obj as l_obj
语句?
我想有一个布尔函数应该可以工作。
有什么我不明白的理由吗?
set_position (a_pos: like position)
do
position := a_pos
separate status_keeper as l_status_keeper_sep do
l_status_keeper_sep.set_position (position)
end
ensure
position = a_pos
separate status_keeper as l_status_keeper_sep do -- the compiler doesn't agree with separate keyword here
l_status_keeper_sep.position = a_pos
end
end