Skip to content

Name hygiene in expanded structure command #793

@gebner

Description

@gebner

Prerequisites

  • Put an X between the brackets on this line if you have done all of the following:
    • Checked that your issue isn't already filed.
    • Reduced the issue to a self-contained, reproducible test case.

Description

When a macro expands to a structure, name resolution fails in fields with dependent types.

Steps to Reproduce

macro "foo" : command =>
  `(structure Foo where
      val : Nat
      prop : val = 42)

foo

Expected behavior: foo declares the structure Foo

Actual behavior: foo fails with unknown identifier 'val✝'

Versions

Nightly from November 12.

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