iOS LiveActivity dynamic island compile error

i'm struct dynamic island detail content

dynamicIsland: { context in
            DynamicIsland {
                expandedContent(context: context)
            } compactLeading: {
                ....
            } compactTrailing: {
                ...
            } 

i want show different content based on context.

private func expandedContent(context: ActivityViewContext<xxxx>)->DynamicIslandExpandedContent<some View> {
        if (context.state.style == 0) {
            return expandedControlContent1(context: context)
        } else if (context.state.style == 1) {
            return expandedControlContent2(context: context)
        } else {
            return expandedControlContent3(context: context)
        }
    }

compiles error

Function declares an opaque return type 'some View', but the return statements in its body do not have matching underlying types