Is this error intentional, or a bug?

protocol A {}


protocol B {}


typealias C = A & B // valid


extension C {} // Error: Non-nominal type 'C' (aka 'A & B') cannot be
extended


extension A where Self: B {} // valid


struct Foo: C {} // valid


Since extension A where Self: B is the same as extension B where Self: A,
and C is defined as any A that also inherits from B, shouldn’t extension C be
just as valid?

This seems like it should be valid, so I filed this bug,
https://bugs.swift.org/browse/SR-5260.

- Steve
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to