-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed as duplicate of#45682
Copy link
Labels
compilerThe Swift compiler itselfThe Swift compiler itselfconformancesFeature → protocol: protocol conformancesFeature → protocol: protocol conformancesnested typesFeature: nested typesFeature: nested typesoperatorsFeature: operatorsFeature: operatorsswift 4.0type checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysisunexpected errorBug: Unexpected errorBug: Unexpected error
Description
Previous ID | SR-6526 |
Radar | None |
Original Reporter | @hartbit |
Type | Bug |
Status | Resolved |
Resolution | Duplicate |
Environment
Xcode 9.1 (9B55)
Additional Detail from JIRA
Votes | 0 |
Component/s | Compiler |
Labels | Bug |
Assignee | None |
Priority | Medium |
md5: fb096e9bc4169fc9bbcf35e80ff44420
duplicates:
- SR-3092 Function-level nested types cannot conform to Equatable
Issue Description:
func foo() {
struct Inner: Equatable { // error: Type 'Inner' does not conform to protocol 'Equatable'
let prop: Int
static func ==(lhs: Inner, rhs: Inner) -> Bool {
return lhs.prop == rhs.prop
}
}
}
Metadata
Metadata
Assignees
Labels
compilerThe Swift compiler itselfThe Swift compiler itselfconformancesFeature → protocol: protocol conformancesFeature → protocol: protocol conformancesnested typesFeature: nested typesFeature: nested typesoperatorsFeature: operatorsFeature: operatorsswift 4.0type checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysisunexpected errorBug: Unexpected errorBug: Unexpected error