I'm running into some issues when using an extension macro on a nested type that references another nested type. My setup is roughly:
enum Foo {
struct Bar {
}
@MyMacro
struct Baz {
let bar: Bar
}
}
/// Macro Expansion A
extension Foo.Bar { // Error A: `Bar` is private
var wrappedBar: Bar { ... } // Error B: Cannot find type `Bar` in scope
}
/// Macro Expansion B
extension Bar { // Seems to work
var wrappedBar: Bar { ... } // Error B: Cannot find type `Bar` in scope
}
Any suggestions on what else I can do here to get this working?