Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-5568] Crash for class with subscript and member named "subscript" that have the same signature #48140

Closed
ahoppen opened this issue Jul 28, 2017 · 1 comment
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@ahoppen
Copy link
Contributor

ahoppen commented Jul 28, 2017

Previous ID SR-5568
Radar None
Original Reporter @ahoppen
Type Bug
Status Closed
Resolution Done
Environment

Xcode 9 beta 4, master commit 707e6de

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee @ahoppen
Priority Medium

md5: 5343c29885ce6fb5663b74414deac5e4

relates to:

  • SR-5506 Change name mangling of subscripts to no longer contain the string "subscript"

Issue Description:

Compiling the following code crashes in SILGen because the instance variable "`subscript`" and the subscript declaration have the same signature and their getters thus share the same mangled name.

struct Input {
}

struct Output {
}

class Foo {
  var `subscript`: (Input) -> Output {
    fatalError()
  }

  subscript(myarg: Input) -> Output {
    fatalError()
  }

  init() {
    fatalError()
  }
}
@belkadan
Copy link
Contributor

Not sure this is worth tracking separately from SR-5506.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

2 participants