compilerdiagnostics qualityfix-itsgenericsgood first issueopaque parameter typesstatic declarationstype checker
仓库指标
- Star
- (69,989 star)
- PR 合并指标
- (平均合并 8天 17小时) (30 天内合并 510 个 PR)
描述
Description
In the following example the compiler offers to replace p with some P, which is obviously not going to work. The same applies to any P.
Reproduction
protocol P {
static var x: Int {get}
}
func foo(p: some P) -> Int {
p.x
}
Expected behavior
We should probably make it wrap the base in type(of:) instead.
Environment
Swift version 6.3-dev (1ae8ef0004e7405)
Additional information
No response