Skip to content

Commit

Permalink
Fix version dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
lopezm94 committed Mar 2, 2017
1 parent 374b8b9 commit f31e70d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/SugarBLAS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ macro call(expr::Expr)
end

#Version 0.6 downwards
function construct_case_statement(lines::Vector, ::Type{Val{false}})
function construct_case_statement(lines::Vector, ::Type{Val{true}})
failproof(s) = s
failproof(s::Char) = string("'",s,"'")
line = lines[1]
Expand All @@ -87,7 +87,7 @@ function construct_case_statement(lines::Vector, ::Type{Val{false}})
end

#Version 0.6 upwards
function construct_case_statement(lines::Vector, ::Type{Val{true}})
function construct_case_statement(lines::Vector, ::Type{Val{false}})
failproof(s) = s
failproof(s::Char) = string("'",s,"'")
line = lines[1]
Expand All @@ -105,7 +105,7 @@ end
"""
Transforms the custom case expression to a string representing the equivalent if-then-else block of code.
"""
construct_case_statement(lines::Vector) = construct_case_statement(lines, Val{VERSION>v"0.6.0"})
construct_case_statement(lines::Vector) = construct_case_statement(lines, Val{VERSION>=v"0.6.0-dev"})

This comment has been minimized.

Copy link
@tkelman

tkelman Mar 2, 2017

Contributor

should be more specific about version cutoffs like this - what are you trying to avoid?

This comment has been minimized.

Copy link
@lopezm94

lopezm94 Mar 2, 2017

Author Owner

I'll make sure to put some comments, I'm trying to workaround the changes made in the Julia parser. The AST for a => b is different in the nightly build.

This comment has been minimized.

Copy link
@tkelman

tkelman Mar 2, 2017

Contributor

that's JuliaLang/julia#20327, v"0.6.0-dev.2613"

This comment has been minimized.

Copy link
@lopezm94

lopezm94 Mar 2, 2017

Author Owner

Thanks, I'll re-tag.



"""
Expand Down

0 comments on commit f31e70d

Please sign in to comment.