https://bugzilla.novell.com/show_bug.cgi?id=398278
User mvidner@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=398278#c2
Martin Vidner changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
--- Comment #2 from Martin Vidner 2008-06-11 06:44:24 MDT ---
To debug this, it is useful to define DO_DEBUG=1 in Type.cc
The same code with string instead of float correctly produces an error.
A contributing factor to the bug is the automatic type conversion:
"integer i = 3.14;" makes i == 3.
(it warns Implicit float conversion will loose(sic) accuracy)
The type checking is sloppy and says "OK" when the list items are *convertible*
to the declared type, but it does not actually do the conversion.
A possible fix is to test for match == 0 in Type::commontype, instead of the
two tests for match >= 0. It works to fix your test case (type mismatch in
variable definition; Expected 'list <integer>', seen 'list') and the rest of
the libycp testsuite passes, but I feel I should give it a full test coverage
in autobuild BETA.
--
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.