Skip to content

Chained calls can result in extra parentheses in macro code if the first call has arguments #15849

Open
@syeopite

Description

@syeopite

Bug Report

I'm not entirely sure if this is a bug but the following fails to compile because dig("key").itself gets rendered as (dig("key")).itself with a set of extra parentheses around the first call:

a_container = {} of String => String

macro access(container, through_expression)
    {{container}}.{{through_expression.stringify.id}}
end

access a_container,
through_expression: dig("key").itself

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:bugA bug in the code. Does not apply to documentation, specs, etc.topic:compiler:parser

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions