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-6476] JavaScriptCore subscripting methods aren't imported as Swift subscripts #49026

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

Comments

@benrimmington
Copy link
Collaborator

Previous ID SR-6476
Radar rdar://problem/35718990
Original Reporter @benrimmington
Type Bug
Status Resolved
Resolution Invalid
Environment
  • Apple Swift version 4.0.2 (swiftlang-900.0.69.1 clang-900.0.38)

  • macOS High Sierra version 10.13.1 (17B48)

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, ClangImporter
Assignee None
Priority Medium

md5: 815842c85ce3d91a991ccc7056652f3d

Issue Description:

Objective-C subscripting methods in the JSContext(SubscriptSupport) and JSValue(SubscriptSupport) categories aren't imported as Swift subscripts.

SwiftDeclConverter::importSubscript in lib/ClangImporter/ImportDecl.cpp is supposed to create a Swift subscript and mark the subscripting methods with @available(*, unavailable, message: "use subscripting").

Documentation:

Source Files:

@belkadan
Copy link
Contributor

The Objective-C subscript methods have to have matching types in order for Swift to turn them into a subscript. Please file a bug report against JavaScriptCore about this at https://bugreport.apple.com.

@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