-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Open
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-15746 |
Radar | None |
Original Reporter | @AnthonyLatsis |
Type | Bug |
Environment
Swift version 5.6-dev (LLVM 7b20e61dd04138a, Swift ab0577a91f0b152)
Additional Detail from JIRA
Votes | 0 |
Component/s | Compiler |
Labels | Bug, TypeChecker |
Assignee | None |
Priority | Medium |
md5: b54a35bf020183fecb5284cf34b550ce
Issue Description:
protocol P {}
class Class {}
func foo<U>(_: U) where U: P & Class {}
do {
// error: global function 'foo' requires that 'Class' conform to 'P'
// error: cannot convert value of type 'Bool' to expected argument type 'Class'
foo(false)
}
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