Skip to content

named local syntax can only have two name components #13268

@Rob23oba

Description

@Rob23oba

Prerequisites

Description

local syntax (name := nm) ... declarations don't work (i.e. the syntax can't be used later) when nm consists of more than two name components.

Context

Writing a do elaborator.

Steps to Reproduce

local macro (name := hi) "test1" : term => `(42)
local macro (name := hi.there) "test2" : term => `(42)
local macro (name := hi.there.more) "test3" : term => `(42)
local macro (name := hi.there.more.yes) "test4" : term => `(42)

#check test1 -- works
#check test2 -- works
#check test3 -- fails
#check test4 -- fails

Expected behavior: All macros work equally, the name doesn't matter.

Actual behavior: The name does matter, only test1 and test2 work.

Versions

Lean 4.31.0-nightly-2026-04-03

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions