JuliaServices / Match.jl

Advanced Pattern Matching for Julia
https://juliaservices.github.io/Match.jl/latest/
Other
240 stars 22 forks source link

use `false` instead of `Symbol(false)` #58

Closed JeffBezanson closed 2 years ago

JeffBezanson commented 4 years ago

See https://github.com/JuliaLang/julia/pull/34077#issuecomment-565172774

Symbols named false used to round-trip incorrectly; they would be converted to Bool at some point. This is now fixed. false can be placed in an AST directly; it doesn't need to be a Symbol.

JeffBezanson commented 4 years ago

https://github.com/kmsquire/Match.jl/blob/98f305c62ae6d03e4f65033d038a23d568589c24/src/matchmacro.jl#L112

kmsquire commented 4 years ago

What version of Julia should changing this require?

JeffBezanson commented 4 years ago

Replacing Symbol(false) with false should work on all versions.

vtjnash commented 2 years ago

Presumably this is why PkgEval is failing:

Error During Test at /home/pkgeval/.julia/packages/Match/qiTCM/test/matchtests.jl:303
  Test threw exception
  Expression: balance(Black(1, Red(2, Red(3, Leaf(), Leaf()), Leaf()), Leaf())) == Red(2, Black(3, Leaf(), Leaf()), Black(1, Leaf(), Leaf()))
  UndefVarError: false not defined
  Stacktrace:
   [1] balance(tree::Black)
     @ Main ~/.julia/packages/Match/qiTCM/test/matchtests.jl:294
kmsquire commented 2 years ago

Sorry, I forgot all about this.