-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselftype checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis
Description
| Previous ID | SR-12736 |
| Radar | rdar://problem/62894047 |
| Original Reporter | @SusanDoggie |
| Type | Bug |
| Status | Resolved |
| Resolution | Done |
Environment
swift 5.1
swift 5.2.3
Xcode 11.4.1
Additional Detail from JIRA
| Votes | 0 |
| Component/s | Compiler |
| Labels | Bug, TypeChecker |
| Assignee | None |
| Priority | Medium |
md5: 81036c9f59b1c54443089757184cc9ce
Issue Description:
The following code will produce a compilation error, but it should not happen.
public protocol ColorModel {
associatedtype Float32Components: ColorComponents where Float32Components.Model == Self, Float32Components.Scalar == Float
init<T: ColorComponents>(_ components: T) where T.Model == Self
var float32Components: Float32Components { get set }
}
public protocol ColorComponents {
associatedtype Model: ColorModel
associatedtype Scalar
}
public protocol ColorPixel {
associatedtype Model: ColorModel
init(color: Model, opacity: Double)
init<C: ColorPixel>(_ color: C) where C.Model == Model
}Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselftype checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis