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-8356] @objc subscript accessors don't include a type encoding #50884

Closed
belkadan opened this issue Jul 24, 2018 · 4 comments
Closed

[SR-8356] @objc subscript accessors don't include a type encoding #50884

belkadan opened this issue Jul 24, 2018 · 4 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself IRGen LLVM IR generation

Comments

@belkadan
Copy link
Contributor

Previous ID SR-8356
Radar rdar://problem/42284266
Original Reporter @belkadan
Type Bug
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, IRGen
Assignee @belkadan
Priority Medium

md5: d7f64557ead1bc2225d37ac822b7ec01

Issue Description:

The ObjC runtime function method_getTypeEncoding returns a description of a method's signature, used for dynamic invocation. It looks like we just didn't implement this in the Swift compiler for subscript accessors; see irgen::emitObjCGetterDescriptorParts and irgen::emitObjCSetterDescriptorParts in GenObjC.cpp.

@belkadan
Copy link
Contributor Author

I feel like it would make more sense to just forward to the implementation for regular functions rather than reimplement the type encoding logic like we do for properties, but I might be missing something. cc @rjmccall

@rjmccall
Copy link
Member

We could probably just use the regular-function implementation on the getter and setter, yeah.

@belkadan
Copy link
Contributor Author

#20559

@belkadan
Copy link
Contributor Author

5.0: #21181

@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 IRGen LLVM IR generation
Projects
None yet
Development

No branches or pull requests

2 participants