Closed jshier closed 5 months ago
@jshier fixed in 0.53.3
This doesn't appear fixed in 0.53.3. Perhaps the fact my type is more nested is the issue?
@Reducer
struct NewExpenseFeature: Reducer {
@Reducer(state: .equatable, action: .equatable)
enum Path {
case summary(SummaryScreen)
@Reducer
struct SummaryScreen {
@ObservableState
struct State: Equatable {
let output: NewExpenseFlowOutput
var isSubmittingExpense: Bool
}
enum Action: Equatable {
case submitExpense
}
// Parent handles action.
}
}
}
In that example SummaryScreen
still gets converted to an enum.
@jshier it turns out I just messed up and only tested the new logic with classes, not structs 🤦♂️
@jshier fixed in 0.53.4
@nicklockwood I'm still experiencing this issue using version 0.53.7
with macros with a generic argument clause, eg:
@FooMacro<Int>
struct Bar {}
This still gets converted to:
@FooMacro<Int>
enum Bar {}
@nicklockwood I'm still experiencing this issue using version
0.53.7
with macros with a generic argument clause, eg:
I didn't actually realize macros could have generic arguments 😅 I'll get this fixed - thanks
@weakfl fixed in 0.53.8
Thanks @nicklockwood, works as expected
Lately,
enumNamespaces
has started treating simplestruct
declarations which have parts of their body synthesized by a macro as if they're namespaces. For example, this small, typical example from the Composable Architecture:This currently gets replaced by an
enum
. I'm not sure how, exactly, the heuristic can be updated to fix this. Perhaps just have the rule ignore types with macros or other attributes attached?