content too accepting
Brought to you by:
pabigot
The content model should prefer types that are close matches to the input; otherwise a double input can be stored in a byte data object simply because int(43.42) produces an integer.
Changing element.compatibleValue to use something like:
instead of:
comes close.
Fixed in [1324].
The current implementation is better but not acceptable. Cf test-typeinf.
_TypeBinding_mixin:_CompatibleValue will not perform automatic type conversions except for int -> long, or string to something that accepts a string in its constructor. This means that content provided as constructor arguments must be exactly what the element wants: no more automatic promotion of ints to floats.