tonyhffong / Lint.jl

A lint tool for Julia code
Other
169 stars 33 forks source link

Spurious "assigning an error to a variable" #209

Closed KristofferC closed 7 years ago

KristofferC commented 7 years ago
julia> lintstr("""
       function f{N}(::N)
           for j in 1:N
           end
       end
       """)
1-element Array{Lint.LintMessage,1}:
 none:2 E539 j: assigning an error to a variable
TotalVerb commented 7 years ago

This particular case seems fine to me because N has to be a type. I suppose the original code had N as a dimension type parameter though? That is indeed a bug. Thanks for the report.

KristofferC commented 7 years ago

I reduced the example too much but yes, originally it was a dimension type of parameter.