Skip to content

Commit 09aab16

Browse files
Added missing namespace for Scope when in ReducerMacro (#2832)
* Added missing namespace to Scope when generating Reducer with macro * Update ReducerMacroTests.swift
1 parent da1cd10 commit 09aab16

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Sources/ComposableArchitectureMacros/ReducerMacro.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ extension ReducerMacro: MemberMacro {
288288
)
289289
reducerTypeScopes.append(
290290
"""
291-
Scope<Self.State, Self.Action, \(type.trimmed)>
291+
ComposableArchitecture.Scope<Self.State, Self.Action, \(type.trimmed)>
292292
"""
293293
)
294294
}

Tests/ComposableArchitectureMacrosTests/ReducerMacroTests.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@
302302
}
303303
304304
@ComposableArchitecture.ReducerBuilder<Self.State, Self.Action>
305-
static var body: ReducerBuilder<Self.State, Self.Action>._Sequence<ReducerBuilder<Self.State, Self.Action>._Sequence<Scope<Self.State, Self.Action, Activity>, Scope<Self.State, Self.Action, Timeline>>, Scope<Self.State, Self.Action, Tweet>> {
305+
static var body: ReducerBuilder<Self.State, Self.Action>._Sequence<ReducerBuilder<Self.State, Self.Action>._Sequence<ComposableArchitecture.Scope<Self.State, Self.Action, Activity>, ComposableArchitecture.Scope<Self.State, Self.Action, Timeline>>, ComposableArchitecture.Scope<Self.State, Self.Action, Tweet>> {
306306
ComposableArchitecture.Scope(state: \Self.State.Cases.activity, action: \Self.Action.Cases.activity) {
307307
Activity()
308308
}
@@ -372,7 +372,7 @@
372372
}
373373
374374
@ComposableArchitecture.ReducerBuilder<Self.State, Self.Action>
375-
static var body: ReducerBuilder<Self.State, Self.Action>._Sequence<Scope<Self.State, Self.Action, Activity>, Scope<Self.State, Self.Action, Timeline>> {
375+
static var body: ReducerBuilder<Self.State, Self.Action>._Sequence<ComposableArchitecture.Scope<Self.State, Self.Action, Activity>, ComposableArchitecture.Scope<Self.State, Self.Action, Timeline>> {
376376
ComposableArchitecture.Scope(state: \Self.State.Cases.activity, action: \Self.Action.Cases.activity) {
377377
Activity()
378378
}
@@ -434,7 +434,7 @@
434434
}
435435
436436
@ComposableArchitecture.ReducerBuilder<Self.State, Self.Action>
437-
static var body: Scope<Self.State, Self.Action, Timeline> {
437+
static var body: ComposableArchitecture.Scope<Self.State, Self.Action, Timeline> {
438438
ComposableArchitecture.Scope(state: \Self.State.Cases.timeline, action: \Self.Action.Cases.timeline) {
439439
Timeline()
440440
}
@@ -561,7 +561,7 @@
561561
}
562562
563563
@ComposableArchitecture.ReducerBuilder<Self.State, Self.Action>
564-
static var body: ReducerBuilder<Self.State, Self.Action>._Sequence<ReducerBuilder<Self.State, Self.Action>._Sequence<Scope<Self.State, Self.Action, Counter>, Scope<Self.State, Self.Action, Counter>>, Scope<Self.State, Self.Action, Counter>> {
564+
static var body: ReducerBuilder<Self.State, Self.Action>._Sequence<ReducerBuilder<Self.State, Self.Action>._Sequence<ComposableArchitecture.Scope<Self.State, Self.Action, Counter>, ComposableArchitecture.Scope<Self.State, Self.Action, Counter>>, ComposableArchitecture.Scope<Self.State, Self.Action, Counter>> {
565565
ComposableArchitecture.Scope(state: \Self.State.Cases.drillDown, action: \Self.Action.Cases.drillDown) {
566566
Counter()
567567
}
@@ -624,7 +624,7 @@
624624
}
625625
626626
@ComposableArchitecture.ReducerBuilder<Self.State, Self.Action>
627-
static var body: Scope<Self.State, Self.Action, Nested.Feature> {
627+
static var body: ComposableArchitecture.Scope<Self.State, Self.Action, Nested.Feature> {
628628
ComposableArchitecture.Scope(state: \Self.State.Cases.feature, action: \Self.Action.Cases.feature) {
629629
Nested.Feature()
630630
}

0 commit comments

Comments
 (0)