[Bug 261643] New: YCP - 'foreach (x, y, map, {<empty>})' writes strange error report - Argument (nil) to foreach(...) is nil
https://bugzilla.novell.com/show_bug.cgi?id=261643 Summary: YCP - 'foreach (x, y, map, {<empty>})' writes strange error report - Argument (nil) to foreach(...) is nil Product: openSUSE 10.3 Version: Alpha 2plus Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: YaST2 AssignedTo: mvidner@novell.com ReportedBy: locilka@novell.com QAContact: jsrain@novell.com buga.ycp: { map <string, boolean> network_settings = $[ "a" : true ]; foreach (string one_service, boolean new_status, network_settings, { // y2milestone ("%1", one_service); }); foreach (string one_service, boolean new_status, network_settings, { y2milestone ("%1", one_service); }); } [Interpreter] test/buga.ycp:4 Argument (nil) to foreach(...) is nil [YCP] test/buga.ycp:9 a `ycpc -E buga.ycp` parsing 'buga.ycp' buga.ycp:4 [Parser] Warning: Empty block is treated as 'nil' done Parsed: { // map <string, boolean> network_settings // filename: "buga.ycp" map <string, boolean> network_settings = $["a":true]; foreach (string one_service, boolean new_status, network_settings, nil); foreach (string one_service, boolean new_status, network_settings, { y2milestone ("%1", one_service); } ); } Actually, it is not confusing if one reads the whole ycpc output but who does so when it has several dozens of lines? It just passes, that's the most important. Anyway, at least the error in log is confusing because it makes me feel that the map 'network_settings' contains 'nil'. -- 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, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=261643 mvidner@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WONTFIX ------- Comment #1 from mvidner@novell.com 2007-06-01 08:19 MST ------- This is really minor. I will concentrate on other interpreter bugs. -- 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, or are watching someone who is.
participants (1)
-
bugzilla_noreply@novell.com