Skip to content

$stringify($vaexpr[0]) evaluates to $vaexpr[0] #2301

@cbuttner

Description

@cbuttner

Is this intended or a limitation of $vaexpr?

module test;
import std::io;

fn int main(String[] args) {
  io::printn(@foo1(args)); // Prints "args"
  io::printn(@foo2(args)); // Prints "$vaexpr[0]"
  return 0;
}

macro @foo1(#expr) {
  return $stringify(#expr);
}

macro @foo2(...) {
  return $stringify($vaexpr[0]);
}

Metadata

Metadata

Assignees

Labels

BugSomething isn't workingFixed needs testingNeeds verification / testing that it now works

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions