Skip to content

Conversation

mgrabka
Copy link

@mgrabka mgrabka commented Jul 15, 2025

This PR adds the rename symbol capability for error set values. There's most likely a more performant way of implementing it I'm not aware of.

const ServiceError = error{ QuotaExceeded } // rename symbol to 'ChangedValue'
//...
_ = ServiceError.QuotaExceeded
const ServiceError = error{ ChangedValue }
//...
_ = ServiceError.ChangedValue // carries over, works in reverse too

This doesn't work for _ = error.QuotaExceeded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant