func foo(bar: Optional<some Any>) {}
is transformed to
func foo(bar: some Any?) {}
but afterwards no longer compiles.
It either needs braces:
func foo(bar: (some Any)?) {}
or kept as is.
Tested with latest main 8337523533bbd153cdac74c8fff4a1ac79a0b805