Implement logic in comparison helpers to perform type casting. Casting to non-number not yet implemented.
This commit is contained in:
parent
5dff03bb37
commit
d47e004084
@ -1019,7 +1019,7 @@ impl<'a> DustRenderer<'a> {
|
|||||||
.as_ref()
|
.as_ref()
|
||||||
.map(|ice| ice.get_context_element_reference())
|
.map(|ice| ice.get_context_element_reference())
|
||||||
});
|
});
|
||||||
let right_side_ce = right_side.as_ref().map(|maybe_ice| {
|
let mut right_side_ce = right_side.as_ref().map(|maybe_ice| {
|
||||||
maybe_ice
|
maybe_ice
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map(|ice| ice.get_context_element_reference())
|
.map(|ice| ice.get_context_element_reference())
|
||||||
@ -1037,6 +1037,16 @@ impl<'a> DustRenderer<'a> {
|
|||||||
// If key did not exist at all, return None
|
// If key did not exist at all, return None
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
let right_side_cast = match (right_side_ce, type_rendered) {
|
||||||
|
(Some(Ok(ce)), Some(target_type)) => ce.cast_to_type(&target_type),
|
||||||
|
_ => None,
|
||||||
|
};
|
||||||
|
match right_side_cast.as_ref() {
|
||||||
|
Some(ice) => {
|
||||||
|
right_side_ce = Some(Ok(ice.get_context_element_reference()));
|
||||||
|
}
|
||||||
|
None => (),
|
||||||
|
}
|
||||||
match tag {
|
match tag {
|
||||||
// Special case: when comparing two RVPaths, if the path
|
// Special case: when comparing two RVPaths, if the path
|
||||||
// points to the same value then they are equal. This is
|
// points to the same value then they are equal. This is
|
||||||
|
Loading…
x
Reference in New Issue
Block a user