Closed vicchig closed 2 years ago
Thanks @vicchig. this would be amazing. do we have enough time to fix/add this?
@MajeedKazemi
This is one of the additions we talked about in our meeting last week, right? It depends on whether the bugs take a while to fix or not. I would say that if I get to this by the end of this week then there should be enough time. I would make sure that all of the bugs are ironed out first though.
But it might be a bit too difficult to add now.
We have time until Jan 10 (the day users start working with nova)
This is only for operators that are defined for multiple types (for example the +
operator works on both strings and integers). For operators that only support a single type, it should still highlight the operands individually because there is only a single type to convert them to. For example in (123 - 'abc')
there is no option other than to convert 'abc'
to a number (note that this is not even always possible).
Related #530
Implemented by #558 even though it is not a bug fix.
Ex.
123 + 'abc'
will suggest that'abc'
is changed to an integer if it is added second and will suggest that123
is changed to a string if it is added second.What should be done instead is that the entire binary operator is highlighted (instead of one of the operands) and then we offer both fixes as an option.Although
'abc'
cannot be converted to a number here.