{"action":"closed","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/12847","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/12847/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/12847/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/12847/events","html_url":"https://github.com/JuliaLang/julia/issues/12847","id":103732618,"number":12847,"title":"deprecated int method fails for non-concrete arrays of strings","user":{"login":"peeterjoot","id":163208,"avatar_url":"https://avatars.githubusercontent.com/u/163208?v=3","gravatar_id":"","url":"https://api.github.com/users/peeterjoot","html_url":"https://github.com/peeterjoot","followers_url":"https://api.github.com/users/peeterjoot/followers","following_url":"https://api.github.com/users/peeterjoot/following{/other_user}","gists_url":"https://api.github.com/users/peeterjoot/gists{/gist_id}","starred_url":"https://api.github.com/users/peeterjoot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peeterjoot/subscriptions","organizations_url":"https://api.github.com/users/peeterjoot/orgs","repos_url":"https://api.github.com/users/peeterjoot/repos","events_url":"https://api.github.com/users/peeterjoot/events{/privacy}","received_events_url":"https://api.github.com/users/peeterjoot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JuliaLang/julia/labels/backport%20pending%200.4","name":"backport pending 0.4","color":"fad8c7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-28T14:50:11Z","updated_at":"2015-09-15T22:15:51Z","closed_at":"2015-09-15T22:15:51Z","body":"I asked a question like the following on stackoverflow and Matt B asked me to report this as an issue, stating \"The deprecated method should work and the warning message should print a valid suggestion\"\r\n\r\nI'm unable to convert integer regular expression captures values to an array of integers in Julia 0.4.  \r\n\r\nIn Julia 0.3 I could do this with int(), basically like:\r\n\r\n    c = [\"1\", \"2\"] ;\r\n    int(c)\r\n\r\nBut in Julia 0.4, this works for regular strings:\r\n\r\n    julia> c = [\"1\", \"2\"] ;\r\n    \r\n    julia> int(c)\r\n    2-element Array{Int64,1}:\r\n     1\r\n     2\r\n\r\nbut doesn't work with substrings (i.e. regex captures):\r\n\r\n    re_dcIV = r\"^\r\n    ([IV])(\\S+)\\s+\r\n    (\\d+)\\s+\r\n    (\\d+)\\s+\r\n    DC\\s+\r\n    (\\S+)\\s*$\"x ;\r\n\r\n    line = \"V1 1 2 DC 1\" ;\r\n\r\n    m = match( re_dcIV, line ) ;\r\n\r\n    c = m.captures ;\r\n    println( \"$c\\n\" ) ;\r\n\r\n    nodes = int(c[3:4]) ;\r\n\r\nwhich produces:\r\n\r\n    julia> nodes = int(c[3:4]) ;\r\n    WARNING: int(x::AbstractArray) is deprecated, use round(Int64,x) instead.\r\n     in depwarn at deprecated.jl:63\r\n     in int at deprecated.jl:49\r\n    while loading no file, in expression starting on line 0\r\n    ERROR: MethodError: `round` has no method matching round(::Type{Int64}, ::SubString{UTF8String})\r\n    Closest candidates are:\r\n      round{T<:Integer}(::Type{T<:Integer}, ::Integer)\r\n      round{T<:Integer}(::Type{T<:Integer}, ::Float16)\r\n      round{T<:Union{Signed,Unsigned}}(::Type{T<:Union{Signed,Unsigned}}, ::Base.MPFR.BigFloat)\r\n      ...\r\n     in round at floatfuncs.jl:72\r\n     in int at deprecated.jl:51\r\n\r\nThe type of the capture array is:\r\n\r\n    Union{SubString{UTF8String},Void}[\"V\",\"1\",\"1\",\"2\",\"1\"]\r\n\r\nand I'm not able to execute int(c[3:4]) on a subset of that beastie."}}