diff --git a/Sources/ComposableArchitectureMacros/ReducerMacro.swift b/Sources/ComposableArchitectureMacros/ReducerMacro.swift index 86bd03b497c1..911539e36bdf 100644 --- a/Sources/ComposableArchitectureMacros/ReducerMacro.swift +++ b/Sources/ComposableArchitectureMacros/ReducerMacro.swift @@ -369,12 +369,14 @@ extension ReducerMacro: MemberMacro { if !hasBody { var staticVarBody = "" if reducerTypeScopes.isEmpty { - staticVarBody = "EmptyReducer" + staticVarBody = "ComposableArchitecture.EmptyReducer" } else if reducerTypeScopes.count == 1 { staticVarBody = reducerTypeScopes[0] } else { for _ in 1...(reducerTypeScopes.count - 1) { - staticVarBody.append("ReducerBuilder._Sequence<") + staticVarBody.append( + "ComposableArchitecture.ReducerBuilder._Sequence<" + ) } staticVarBody.append(reducerTypeScopes[0]) staticVarBody.append(", ") diff --git a/Tests/ComposableArchitectureMacrosTests/ReducerMacroTests.swift b/Tests/ComposableArchitectureMacrosTests/ReducerMacroTests.swift index c6e787e890cf..386ffc647642 100644 --- a/Tests/ComposableArchitectureMacrosTests/ReducerMacroTests.swift +++ b/Tests/ComposableArchitectureMacrosTests/ReducerMacroTests.swift @@ -234,7 +234,7 @@ } @ComposableArchitecture.ReducerBuilder - static var body: EmptyReducer { + static var body: ComposableArchitecture.EmptyReducer { } @@ -302,7 +302,7 @@ } @ComposableArchitecture.ReducerBuilder - static var body: ReducerBuilder._Sequence._Sequence, ComposableArchitecture.Scope>, ComposableArchitecture.Scope> { + static var body: ComposableArchitecture.ReducerBuilder._Sequence._Sequence, ComposableArchitecture.Scope>, ComposableArchitecture.Scope> { ComposableArchitecture.Scope(state: \Self.State.Cases.activity, action: \Self.Action.Cases.activity) { Activity() } @@ -372,7 +372,7 @@ } @ComposableArchitecture.ReducerBuilder - static var body: ReducerBuilder._Sequence, ComposableArchitecture.Scope> { + static var body: ComposableArchitecture.ReducerBuilder._Sequence, ComposableArchitecture.Scope> { ComposableArchitecture.Scope(state: \Self.State.Cases.activity, action: \Self.Action.Cases.activity) { Activity() } @@ -498,7 +498,7 @@ } @ComposableArchitecture.ReducerBuilder - static var body: EmptyReducer { + static var body: ComposableArchitecture.EmptyReducer { } @@ -561,7 +561,7 @@ } @ComposableArchitecture.ReducerBuilder - static var body: ReducerBuilder._Sequence._Sequence, ComposableArchitecture.Scope>, ComposableArchitecture.Scope> { + static var body: ComposableArchitecture.ReducerBuilder._Sequence._Sequence, ComposableArchitecture.Scope>, ComposableArchitecture.Scope> { ComposableArchitecture.Scope(state: \Self.State.Cases.drillDown, action: \Self.Action.Cases.drillDown) { Counter() }