# Can you satisfy a static member with an enumeration case?

**URL:** <https://forums.swift.org/t/can-you-satisfy-a-static-member-with-an-enumeration-case/28258>\
**Category:** Discussion\
**Tags:** enums, conformance, static\
**Created:** [August 27, 2019, 1:09am UTC](https://forums.swift.org/t/can-you-satisfy-a-static-member-with-an-enumeration-case/28258 "2019-08-27T01:09:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CTMacUser](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/ctmacuser/32/1802_2.png) [@CTMacUser](https://forums.swift.org/u/CTMacUser)\
**Post date:** [August 27, 2019, 1:09am UTC](https://forums.swift.org/t/can-you-satisfy-a-static-member-with-an-enumeration-case/28258/1 "2019-08-27T01:09:14Z")

</div>

I was first trying out a blank number type with:

```
struct Test1 {}

extension Test1: AdditiveArithmetic {
    static let zero = Test1()
    //...
}

```

Then I wondered if I could the same thing with a single-state enum:

```
enumTest2 { case zero }

```

I tried adding `AdditiveArithmetic` conformance, but it turns out that Xcode 10.3 insisted that I add a `static` member to satisfy the `zero` static property. Of course, doing that creates an error that the property clashes with the case. But pulling back, it seems that it should work directly; `.zero` is the name of a value of type `Test2`, just like we can play around between cases and type-static names when making an `OptionSet`.

The version of Xcode 11 beta 6 crashes every time I try to use it, so I have no idea what its version of Swift does.

---

<div class="post-metadata">

**Author:** ![owenv](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/owenv/32/6137_2.png) [@owenv](https://forums.swift.org/u/owenv)\
**Post date:** [August 27, 2019, 1:15am UTC](https://forums.swift.org/t/can-you-satisfy-a-static-member-with-an-enumeration-case/28258/2 "2019-08-27T01:15:26Z")

</div>

Using enum cases this way is not (yet) supported, it's tracked by [SR-3170](https://bugs.swift.org/browse/SR-3170). There are a few questions around whether cases with associated values might be able to satisfy function requirements, but I think the main obstacle here is an implementation + proposal.
