Open
Description
The last line doesn't compile.
protocol Protocol { }
final class Class { }
actor Actor { }
func ƒ(_: some Class & Protocol, _: some Actor & Protocol) { }
func ƒ(_: some Class, _: some Actor) { }
func ƒ(_: any Class & Protocol, _: any Actor & Protocol) { }
func ƒ(_: any Class, _: any Actor) { }
I think it would be better if it wouldn't compile for some
, either, but they should both behave similarly regardless of what that behavior is.
Metadata
Metadata
Assignees
Labels
A deviation from expected or documented behavior. Also: expected but undesirable behavior.Feature → type declarations: Class declarationsThe Swift compiler itselfFeature: values of types like `any Collection`, `Any` and `AnyObject`; type-erased valuesResolution → not a bug: Reported as a bug but turned out to be expected behavior or programmer errorArea → compiler: Semantic analysisFeature: typesBug: Unexpected error