We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Subscripts are currently get-only, which means you can't override the setting behavior.
Something like this should work
type Foo { subscript(_ v: Int) -> Int { get { return 4 } set { print("you gave me"); println(newValue) } } }
The text was updated successfully, but these errors were encountered:
Should a SubscriptSetExpr return anything or just void? (I personally like setters returning the set value)
SubscriptSetExpr
Sorry, something went wrong.
I actually think setters should be void
No branches or pull requests
Subscripts are currently get-only, which means you can't override the setting behavior.
Something like this should work
The text was updated successfully, but these errors were encountered: