Skip to content

Macro Documentation has false value where it should be true. #15018

@thom-schlereth

Description

@thom-schlereth

Elixir and Erlang/OTP versions

Elixir 1.19.4

https://github.com/elixir-lang/elixir/blob/v1.19.4/lib/elixir/pages/meta-programming/macros.md?plain=1#L64

Operating system

Chrome 143.0.7499.109 on Windows 11

Current behavior

In other words, when invoked as:

Unless.macro_unless(true, do: IO.puts("this should never be printed"))

Our macro_unless macro received the following:

macro_unless(true, [do: {{:., [], [{:__aliases__, [alias: **false**], [:IO]}, :puts]}, [], ["this should never be printed"]}])

Expected behavior

Not sure if there's a different place to report Doc issues but linked to the line number in the macro doc in the field up above. If I was understanding the docs right, the Boolean value was flipped from what is should be. If I'm wrong in addition to closing the issue I would appreciate an explanation for my understanding. Thanks!

In other words, when invoked as:

Unless.macro_unless(true, do: IO.puts("this should never be printed"))

Our macro_unless macro received the following:

macro_unless(true, [do: {{:., [], [{:__aliases__, [alias: **true**], [:IO]}, :puts]}, [], ["this should never be printed"]}])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions