zls icon indicating copy to clipboard operation
zls copied to clipboard

Add error set value rename

Open mgrabka opened this issue 6 months ago • 0 comments

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

mgrabka avatar Jul 15 '25 17:07 mgrabka