[swift-evolution] [Pre-pitch] Allowing enums inside protocols?

William Shipley wjs at mac.com
Sat Jul 8 18:11:02 CDT 2017


Does anyone know if there's some good tech reason to not allow, like:

protocol Foozle {
	enum Errors: Error {
		case malformedFoozle
		case tooManyFoozles
	}
}

Like, to me all this is doing is giving “Errors” a nice namespace, but the compiler might have other thoughts.

-W


More information about the swift-evolution mailing list