-
Notifications
You must be signed in to change notification settings - Fork 27
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
Support Subscript builders #69
Comments
What's wrong with creating a function named |
There's two problems:
|
Got it. I tend to forget that subscript is kind of a special property. That being the case... adding support to |
Yeah I figured it should be relatively straightforward since it's basically a special property except that it shares the flexibile generics and method signatures of a function. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I wanted to add conformance to
@dynamicMemberLookup
in some generated code.This is not possible as there's no way (that I can tell) to create subscripts.
Specifically, I wanted to create something like
subscript<Property>(dynamicMember keyPath: KeyPath<BackingData, Property>) -> Property
.There doesn't seem to be any "escape hatch" for TypeSpec.Builder to just type "raw" Swift code.
As such, I think the only way to solve this would be a dedicated function/builder.
The text was updated successfully, but these errors were encountered: