-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Labels
compilerThe Swift compiler itselfThe Swift compiler itselfexistentialsFeature: values of types like `any Collection`, `Any` and `AnyObject`; type-erased valuesFeature: values of types like `any Collection`, `Any` and `AnyObject`; type-erased valuestype checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysistypesFeature: typesFeature: types
Description
| Previous ID | SR-9260 |
| Radar | rdar://problem/56835024 |
| Original Reporter | schwarja (JIRA User) |
| Type | New Feature |
| Status | Resolved |
| Resolution | Duplicate |
Environment
Xcode Version 10.1 (10B61)
Additional Detail from JIRA
| Votes | 0 |
| Component/s | Compiler |
| Labels | New Feature |
| Assignee | None |
| Priority | Medium |
md5: 6965b9b1f82b44fc4710d6389a544fac
duplicates:
Issue Description:
I created a following snippet:
protocol ViewModel {
associatedtype Input
associatedtype Output
func transform(input: Input) -> Output
}
protocol Injectable {
associatedtype VM
var viewModel: VM? { get set }
}
struct RootInput {}
struct RootOutput {}
protocol RootViewModelProtocol: ViewModel where Input == RootInput, Output == RootOutput {}
class RootVC: Injectable {
var viewModel: RootViewModelProtocol?
}Observed: The snippet is not compiled. An error is detected on this line:
Metadata
Metadata
Assignees
Labels
compilerThe Swift compiler itselfThe Swift compiler itselfexistentialsFeature: values of types like `any Collection`, `Any` and `AnyObject`; type-erased valuesFeature: values of types like `any Collection`, `Any` and `AnyObject`; type-erased valuestype checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysistypesFeature: typesFeature: types