From: Dave Rolsky Date: Sat, 17 Sep 2011 14:49:05 +0000 (-0500) Subject: Docs changes to parent(s) for Union types in Changes and Delta X-Git-Tag: 2.0300~41 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b5e5aaef4ff6e3784df9456eabc7e0aa0e5804d2;p=gitmo%2FMoose.git Docs changes to parent(s) for Union types in Changes and Delta --- diff --git a/Changes b/Changes index 0a06072..26818fd 100644 --- a/Changes +++ b/Changes @@ -10,6 +10,10 @@ for, noteworthy changes. [API CHANGES] + * The ->parent and ->parents method for a union now return the nearest + common ancestor of that union's component types. See Moose::Manual::Delta + for more details. (Dave Rolsky) + * The ->is_subtype_of and ->is_a_type_of methods have changed their behavior. Previously, they returned true if any of their member types returned true for a given type. Now, all of the member types must return diff --git a/lib/Moose/Manual/Delta.pod b/lib/Moose/Manual/Delta.pod index 832a35d..3078c04 100644 --- a/lib/Moose/Manual/Delta.pod +++ b/lib/Moose/Manual/Delta.pod @@ -23,6 +23,13 @@ send us a patch. =over 4 +=item The parent of a union type is its components' nearest common ancestor + +Previously, union types considered all of their component types their parent +types. This has been changed to find the nearest common ancestor for all of +its components. For example, a union of "Int|ArrayRef[Int]" now has a parent +of "Defined". + =item Union types consider all members in the C and C methods Previously, a union type would report itself as being of a subtype of a type