Skip to content

Enforce match branch uniqueness #13

@pnorman

Description

@pnorman

Each branch of a match function must be distinct. This could be enforced by glug, which would avoid run-time errors with the style.

A trivial example is

layer(:test, :source=>:spirit, :source_layer=>:"water-lines") {
    line_width match(waterway,
        "foo", 1,
        "foo", 2,
        3
    )
}

This will cause an error like

Error: layers[9].paint.line-width[4]: Branch labels must be unique.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions