-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Bugfix: Convert numbers to Int in extendedterminfo #51195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Before, in the extendedterminfo function in terminfo.jl, if the numbers array was nonempty, the function would fail as a `UInt32` cannot be implicitly converted to the output `Int` type. Do this conversion explicitly.
|
Hi Jacob, I've been thinking about #51190 and I have a number of improvements to Is this change equivalent to changing If it helps, here's my WIP-revised |
|
Regarding the supposed 18% code coverage, I'm a bit suspicious of that. It says |
|
No this bug is much more trivial. The output of julia> Dict{String, Union{Int, String}}("1"=>UInt32(1))
ERROR: MethodError: Cannot `convert` an object of type
UInt32 to an object of type
Union{Int64, String}The real problem is that the function was not tested. |
|
In |
|
Ah I see. Not sure what's up with the coverage then |
|
I did think I added it to |
|
I've now put up my WIP changes as #51198. |
|
Added the merge me label because this is a straightforward bugfix |
Before, in the extendedterminfo function in terminfo.jl, if the numbers array was nonempty, the function would fail as a
UInt32cannot be implicitly converted to the outputInttype. Do this conversion explicitly.Closes #51190
@tecosaur it seems that this function was not tested. Looking at code coverage,
base/terminfo.jlonly has 18% coverage. Would it be possible to test this functionality more thoroughly?