简体   繁体   中英

Eiffel: Unknown identifier on attached check into require statement

    require
        valid_item: attached item as l_i and then l_i.valid_for_insert or l_i.valid_for_update

why do I have an unknown identifier here with l_i??!!!

Try with

valid_item: attached item as l_i and then (l_i.valid_for_insert or l_i.valid_for_update)

Note you can also do

item_set: attached item as l_i 
valid_item: l_i.valid_for_insert or l_i.valid_for_update

you can reuse the object test local variable l_i from a previous precondition.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM