Skip to content

allow calling Error on the error interface#48

Merged
nalgeon merged 1 commit into
solod-dev:mainfrom
pierrec:err-Error
May 10, 2026
Merged

allow calling Error on the error interface#48
nalgeon merged 1 commit into
solod-dev:mainfrom
pierrec:err-Error

Conversation

@pierrec
Copy link
Copy Markdown
Contributor

@pierrec pierrec commented May 9, 2026

This is the patch for #45.

@nalgeon
Copy link
Copy Markdown
Collaborator

nalgeon commented May 9, 2026

Thanks! It treats error.Error as a special case in the compiler, which I usually try to avoid. Still, it might be worth making an exception for a fundamental type like error. I'll think about it some more and get back to you later.

@nalgeon
Copy link
Copy Markdown
Collaborator

nalgeon commented May 10, 2026

Now that I think about it, the error type already gets special treatment in the compiler, since in Go it's built into the language, not just part of the standard library. So it makes sense to handle the error.Error method as well. I'm going to merge this.

@nalgeon nalgeon merged commit 980c76e into solod-dev:main May 10, 2026
3 checks passed
@nalgeon
Copy link
Copy Markdown
Collaborator

nalgeon commented May 10, 2026

Thank you!

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.

2 participants