Skip to content

"typed" pretty printing mode fails with "unresolved name" for macros with variables #691

Closed
@msullivan

Description

@msullivan

For example, in

fn main() {
  #macro([#mylambda(x,body), {fn f(int x) -> int { ret body }; f}]);
  assert(#mylambda(y,y*2)(8) == 16);
}

It will produce "unresolved name" errors for x, body, and y.
I'm not really sure if there is a good way to fix this. Typechecking depends on macro expansion but pretty printing after macro expansion is quite different from pretty printing before it...

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