-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Move implementation checks to test files #9431
Comments
I don't think this is a useful exercise. Noop type checks are removed by the compiler, so there's no runtime impact. But when you browse the code it's much more useful to see implemented interfaces declared next to the struct, not in some other place. |
Initial context is from #9427 (review)
|
move implementation checks to test files #9431
If a type implements an interface, it's highly unlikely that it will be used in the context where that interface is not already linked, so the argument seems pretty weak to me. |
**Description:** move implementation checks to test files **Link to tracking Issue:** #9431
I have added the |
We use implementation checks to make sure an interface is fulfilled by a struct. However, those checks are sometimes made in the code we ship, which introduces dependencies in the code base. Instead, consider moving those to test files.
Additionally, we should add this as a best practice.
The text was updated successfully, but these errors were encountered: