https://bugzilla.novell.com/show_bug.cgi?id=687236 https://bugzilla.novell.com/show_bug.cgi?id=687236#c0 Summary: [yast2-core] YCP: an if-condition evaluating to nil skips both "then" and "else" branches Classification: openSUSE Product: openSUSE 11.4 Version: Final Platform: All OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: YaST2 AssignedTo: mvidner@novell.com ReportedBy: mvidner@novell.com QAContact: jsrain@novell.com Found By: Development Blocker: --- This is an underlying bug in bnc#655571 which was reported on SLE11 SP1. (but the behavior is very old) The code: { boolean cond = nil; if (cond) { y2milestone ("If of 'if(nil)'"); } else { y2milestone ("Else of 'if(nil)'"); } if (true && cond) { y2milestone ("If of 'if(&&nil)'"); } else { y2milestone ("Else of 'if(&&nil)'"); } } Logs only: <3> trikolka(7401) [Interpreter] snippets/ifnil.ycp:3 'if (cond)' evaluates to non-boolean 'nil' (VOID). <3> trikolka(7401) [Interpreter] snippets/ifnil.ycp:12 if condition is nil. The documentation says: http://doc.opensuse.org/projects/YaST/openSUSE11.3/tdg/id_ycp_conditional.ht... The then_part is executed if and only if condition evaluates to true, the else_part otherwise. It is an error if condition evaluates to something other than true or false. I believe that skipping both branches is never what the developer expects and nil should be regarded as false. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.