-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Closed
Copy link
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 itself
Description
Previous ID | SR-7251 |
Radar | None |
Original Reporter | @hamishknight |
Type | Bug |
Status | Closed |
Resolution | Done |
Environment
Swift version 4.2-dev (LLVM cef3fe6d75, Clang bdc970d89c, Swift 5b60ace)
Target: x86_64-apple-darwin17.4.0
Additional Detail from JIRA
Votes | 0 |
Component/s | Compiler |
Labels | Bug |
Assignee | @hamishknight |
Priority | Medium |
md5: 455775109cfbec5e12494dbe7e1b6c61
Issue Description:
This correctly doesn't compile:
struct S {}
extension S {
static var i: Int { return 0 }
struct i {} // error: Invalid redeclaration of 'i'
}
But this does compile:
struct S1<T> {}
extension S1 {
static var i: Int { return 0 }
struct i {} // This is fine!
}
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 itself