Skip to content

No way to describe operator precedence to assertMacroExpansion #2128

Closed
@stephencelis

Description

@stephencelis

Description

It doesn't seem possible to write tests for macros that visit InfixOperatorExprSyntax. This includes the "add blocker" example from swift-macro-examples.

Steps to Reproduce

  1. Try to write a macro test for: https://github.com/DougGregor/swift-macro-examples/blob/66ded9b2774c06c5a51254b0640a456ef1055a68/MacroExamplesPlugin/AddBlocker.swift
  2. The AddVisitor never visits the node because the node doesn't exist in the test run.

Metadata

Metadata

Assignees

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