You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
belkadan opened this issue
Aug 11, 2016
· 0 comments
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
SR-3557 Incorrect function called when defined in extensions
relates to:
SR-2634 Private types collide when in extensions of the same base type in the same file
Issue Description:
struct X {}
extension X {
private func foo() {}
}
extension X {
private func foo() {}
}
While this seems like it should be legal, there are two problems:
1. Our mangling scheme doesn't actually give these different symbol names.
2. When debugging, we don't have a good way to pick one over the other.
We could fix these issues, but it seems simpler to just reject this code: within a file, conflicting "overloads" like this should not be allowed despite being declared private. (Note that this isn't limited to extensions and that one of the members might not be private; that's just the simplest way to show the problem.)
The text was updated successfully, but these errors were encountered:
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
Additional Detail from JIRA
md5: 66a49b33ef65b02821b97f9f072c5232
is duplicated by:
relates to:
Issue Description:
While this seems like it should be legal, there are two problems:
1. Our mangling scheme doesn't actually give these different symbol names.
2. When debugging, we don't have a good way to pick one over the other.
We could fix these issues, but it seems simpler to just reject this code: within a file, conflicting "overloads" like this should not be allowed despite being declared
private
. (Note that this isn't limited to extensions and that one of the members might not beprivate
; that's just the simplest way to show the problem.)The text was updated successfully, but these errors were encountered: