Open antholeole opened 3 years ago
Hi! I'm using this package and when writing tests, I often get failed messages like:
<instance of MySealedUnion> does not match <instance of MySealedUnion>
which makes it a little difficult to debug. My proposed solution is an override of the toString method for every union that looks like the following:
class Union4Impl<A, B, C, D> { @override String toString() => "$union4Impl:${join((a) => a.toString(), (b) => b.toString(), (c) => c.toString(), (d) => a.toString())}";
all the information still stays: this is a union 4 impl, but we pass down the toString to the actual class that is there.
let me know if we're open to a PR :)
Hi! I'm using this package and when writing tests, I often get failed messages like:
which makes it a little difficult to debug. My proposed solution is an override of the toString method for every union that looks like the following:
all the information still stays: this is a union 4 impl, but we pass down the toString to the actual class that is there.
let me know if we're open to a PR :)