value
is stripped of its class in comparison validation functions
#537
Labels
value
is stripped of its class in comparison validation functions
#537
Discovered while investigating #536. Reprex:
In the example above, the user might expect
col_vals_lt()
to compare the column to the value ofSys.Date()
, a date object. Instead, I found that it's constructing the expressiondate < 19881
insidetbl_val_comparison()
.I tracked this down to
get_values_at_idx()
(which is called byinterrogate_comparison()
). The class stripping happens due to the wayget_values_at_idx()
is written:It seems that
unlist()
is stripping the value of its class:As far as I can see this isn't producing any bugs on known behaviors, but I thought it'd be nice to try to preserve the class (this may be helpful in tackling #536). But I may also be missing something - please let me know!
The text was updated successfully, but these errors were encountered: