Skip to content

Commit 85eb525

Browse files
authored
Fix use #filePath for filePath defaults (#3773)
- Use #filePath (not #fileID) as the default for filePath in Binding.scope, ObservedObject.Wrapper.scope, and SwiftUI.Bindable.scope. - This corrects issue-reporting metadata so diagnostics reference the correct file path.
1 parent d772c21 commit 85eb525

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/ComposableArchitecture/Observation/Store+Observation.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ extension Binding {
175175
state: KeyPath<State, ChildState?>,
176176
action: CaseKeyPath<Action, PresentationAction<ChildAction>>,
177177
fileID: StaticString = #fileID,
178-
filePath: StaticString = #fileID,
178+
filePath: StaticString = #filePath,
179179
line: UInt = #line,
180180
column: UInt = #column
181181
) -> Binding<Store<ChildState, ChildAction>?>
@@ -203,7 +203,7 @@ extension ObservedObject.Wrapper {
203203
state: KeyPath<State, ChildState?>,
204204
action: CaseKeyPath<Action, PresentationAction<ChildAction>>,
205205
fileID: StaticString = #fileID,
206-
filePath: StaticString = #fileID,
206+
filePath: StaticString = #filePath,
207207
line: UInt = #line,
208208
column: UInt = #column
209209
) -> Binding<Store<ChildState, ChildAction>?>
@@ -293,7 +293,7 @@ extension SwiftUI.Bindable {
293293
state: KeyPath<State, ChildState?>,
294294
action: CaseKeyPath<Action, PresentationAction<ChildAction>>,
295295
fileID: StaticString = #fileID,
296-
filePath: StaticString = #fileID,
296+
filePath: StaticString = #filePath,
297297
line: UInt = #line,
298298
column: UInt = #column
299299
) -> Binding<Store<ChildState, ChildAction>?>

0 commit comments

Comments
 (0)