Skip Menu |

This queue is for tickets about the Type-Tiny CPAN distribution.

Report information
The Basics
Id: 93345
Status: resolved
Priority: 0/
Queue: Type-Tiny

People
Owner: perl [...] toby.ink
Requestors: perl [...] toby.ink
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: 1.000000



From: mail [...] tobyinkster.co.uk
These should probably never be inlined. my $type = ...; my $arr_of_type = ArrayRef[$type]; $arr_of_type->coerce(undef); $type->coercion->add_type_coercions(...); # Now $arr_of_type has no knowledge of the new # coercions. :-(
This is tricky stuff. I think I'm going to defer doing anything and instead encourage people not to get into this situation. https://github.com/tobyink/p5-type-tiny/commit/ed53e4f12d7aaa5443c4491c21a63d6937c5a3c0#diff-af517e8a7ebe70f12310e15a31356405R303
This is partially resolved by: https://github.com/tobyink/p5-type-tiny/commit/cc1f9e1e4328ed4655714ef2a8c7d8a0b91ec1d8 This will prevent non-frozen Type::Coercion objects from advertising themselves as inlineable. It still doesn't solve what should happen in the case of ArrayRef[$foo] and other parameterized types, where $foo later has coercions added to it. (Which is an awful, evil thing to attempt!)
Type-Tiny-1.000000 has been released, mostly resolving this.