v0lk
v0lk

Reputation: 58

How to solve Type 'MyType' does not conform to multiple protocols?

I'm new to swift and I dont understand what these errors mean, wondering if anyone can suggest how to fix these, thanks in advance.

struct Place: Hashable, Identifiable, Codable {



    var placeName: String
    var regularEvents:[WeeklyEvent]


}

I get the error type 'Place' does not conform to protocol 'Equatable'

Upvotes: 0

Views: 48

Answers (1)

Muhammad Shauket
Muhammad Shauket

Reputation: 2778

The error comes because of this var weeklyEvents:[WeeklyEvent] You need to defineWeeklyEvent` struct

struct WeeklyEvent: Codable, Hashable {
//your properties

}

Upvotes: 1

Related Questions