# Conforming to Equatable Protocol

**URL:** https://talk.remobjects.com/t/conforming-to-equatable-protocol/15965
**Category:** Silver
**Created:** [March 30, 2018, 1:12pm UTC](https://talk.remobjects.com/t/conforming-to-equatable-protocol/15965 "2018-03-30T13:12:35Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![aaronbratcher1](https://talk.remobjects.com/user_avatar/talk.remobjects.com/aaronbratcher1/32/6180_2.png) [@aaronbratcher1](https://talk.remobjects.com/u/aaronbratcher1)
#### Post date: [March 30, 2018, 1:12pm UTC](https://talk.remobjects.com/t/conforming-to-equatable-protocol/15965/1 "2018-03-30T13:12:36Z")

</div>

I have a struct that I copied over from Xcode where it compiles fine. Because structs with methods aren’t supported yet, I converted it to a class.

However, it still doesn’t compile. I get an error:  
Method “static op\_Equality(\_ lhs: instancetype, \_ rhs: instancetype) -\> Bool” not implemented as required for interface. The protocol only requires the == method and it’s there.

This is my class:

```
public class SharedIndexPath: Equatable {
	typealias Element = Int

	var indices:[Element] = []

	var count: Int {
		return indices.count
	}

	var row: Int {
		return indices[1]
	}

	var section: Int {
		return indices[0]
	}

	public static func ==(lhs: SharedIndexPath, rhs: SharedIndexPath) -> Bool {
		guard lhs.count == rhs.count else { return false }
		return lhs.row == rhs.row && lhs.section == rhs.section
	}

	init() { }

	init(indexes: [Element]) {
		for index in indexes {
			indices.append(index)
		}
	}

	init(row: Int, section: Int = 0) {
		indices.append(section)
		indices.append(row)
	}
}

```

Why won’t this compile under Silver? Fire version 10.0.0.2265
