diff --git a/Sources/DependenciesMacrosPlugin/DependencyEndpointMacro.swift b/Sources/DependenciesMacrosPlugin/DependencyEndpointMacro.swift index 7eb49add..332d997d 100644 --- a/Sources/DependenciesMacrosPlugin/DependencyEndpointMacro.swift +++ b/Sources/DependenciesMacrosPlugin/DependencyEndpointMacro.swift @@ -160,7 +160,15 @@ public enum DependencyEndpointMacro: AccessorMacro, PeerMacro { parameters[i].secondName = TokenSyntax(stringLiteral: "p\(offset)") parameters[i].colon = parameters[i].colon ?? .colonToken(trailingTrivia: .space) } - let appliedParameters = (0.. String = { _ in + "Hello, world" + } + } + """ + } expansion: { + """ + struct Blah { + public var doAThing: (_ a: inout Int, _ b: Int, _ c: inout Bool) -> String = { _ in + "Hello, world" + } { + @storageRestrictions(initializes: _doAThing) + init(initialValue) { + _doAThing = initialValue + } + get { + _doAThing + } + set { + _doAThing = newValue + } + } + + public func doAThing(a p0: inout Int, b p1: Int, c p2: inout Bool) -> String { + self.doAThing(&p0, p1, &p2) + } + + private var _doAThing: (_ a: inout Int, _ b: Int, _ c: inout Bool) -> String = { _ in + XCTestDynamicOverlay.XCTFail("Unimplemented: 'doAThing'") + return "Hello, world" + } + } + """ + } + } }