Skip to content

structs shouldn't implement outstanding by default #4

@matt-beanland

Description

@matt-beanland

Currently the outstanding protocol has @fallback_to_any true, which makes it look like there is an outstanding implementation for every type, due to the default implementation. This negates the value of the Inspect protocol to see whether Outstanding protocol has actually been implemented for an instance of a type.

The defoutstanding expected :: Any, actual :: Any implements a basic outstanding based on equivalence, or if a struct uses the defoutstanding expected :: Map, actual :: Any to handle custom structs, most likely not in the way you'd like them handled.

Remove fallback to any so that custom struts need to implement def outstanding themselves, which makes them consider what should happen.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions