[Bug 205663] New: YCP (yast2-core) - Reference to Integer doesn't work
https://bugzilla.novell.com/show_bug.cgi?id=205663 Summary: YCP (yast2-core) - Reference to Integer doesn't work Product: openSUSE 10.2 Version: Alpha 4 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 See this example: { void ChangeInteger (integer & in) { y2milestone("Changing from %1", in); in = 2; } integer in1 = 1; y2milestone("Old Integer: %1", in1); ChangeInteger(in1); y2milestone("New Integer: %1", in1); } It should work but ycpc reports: parsing 'ref_int.ycp' ref_int.ycp:4 [Parser] type mismatch in assignment ref_int.ycp:4 [Parser] Expected 'integer &', seen 'const integer'. Error This works for 'map' and 'string' (both tested), I hope it works for the other types as well. -- 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=205663 mvidner@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |visnov@novell.com Status|NEW |ASSIGNED ------- Comment #1 from mvidner@novell.com 2006-09-21 09:16 MST ------- Apparently there is a bug in Type::basematch: if (expected->isReference() && (!expected->isConst() && isConst())) { #if DO_DEBUG y2debug ("doesn't expect const"); #endif return -1; } I don't know what this means, it may intend to prevent initializing a reference to a const to something that is not a const, but it swaps "this" and "expected". It happens to work for strings, because string literals are of type string, not const string. Weird. -- 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=205663 mvidner@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Component|YaST2 |YaST2 Product|openSUSE 10.2 |openSUSE 10.3 Fixed in Milestone|--- |unspecified Version|Alpha 4 |Alpha 1 ------- Comment #2 from mvidner@novell.com 2006-11-14 04:29 MST ------- I will not fix this bug for 10.2. Moving to 10.3 -- 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=205663 User mvidner@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=205663#c3 Martin Vidner <mvidner@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aschnell@novell.com --- Comment #3 from Martin Vidner <mvidner@novell.com> 2008-07-14 07:55:33 MDT --- *** Bug 408891 has been marked as a duplicate of this bug. *** https://bugzilla.novell.com/show_bug.cgi?id=408891 -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=205663 User visnov@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=205663#c4 --- Comment #4 from Stanislav Visnovsky <visnov@novell.com> 2008-09-25 06:37:14 MDT --- float fails as well. The reason is that integer and float constants are 'const' while string, map and list are not. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=205663 Jiri Srain <jsrain@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P3 - Medium -- 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.
participants (1)
-
bugzilla_noreply@novell.com