-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Open
Labels
accepts invalidBug: Accepts invalidBug: Accepts invalidbugA 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 itself
Description
| Previous ID | SR-4875 |
| Radar | None |
| Original Reporter | @rintaro |
| Type | Bug |
Environment
Xcode8.3.2
Additional Detail from JIRA
| Votes | 0 |
| Component/s | Compiler |
| Labels | Bug, AcceptsInvalid |
| Assignee | @slavapestov |
| Priority | Medium |
md5: f1ef05c08a6589e24bf54d7f026401f0
Issue Description:
struct Foo<K,V> {
var k: K
var v: V
}
typealias IntFoo<V> = Foo<Int, V>
extension IntFoo where V == Int {
func f() {
print(k)
}
}
Foo(k: "test", v: 1).f()This should be rejected as:
constrained extension must be declared on the unspecialized generic type 'Foo' with constraints specified by a 'where' clause
Metadata
Metadata
Assignees
Labels
accepts invalidBug: Accepts invalidBug: Accepts invalidbugA 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 itself