Permalink
Browse files

Propograte coercion to parent type for any generated types.

  • Loading branch information...
1 parent a1187d9 commit 15cfef2373fbdb0da7ffdd61ec9a29b03ef1e1f6 @bacek committed Oct 9, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/W3C/SOAP/XSD.pm
View
@@ -329,6 +329,14 @@ sub xsd_subtype {
via { $_->textContent };
}
+ # Propogate coercion from Any via parent's type coercion.
+ my $this_type = $subtype->parent;
+ if ($this_type->has_parent) {
+ coerce $subtype
+ => from 'Any'
+ => via { $this_type->parent->coerce($_) };
+ }
+
return $subtype;
}

0 comments on commit 15cfef2

Please sign in to comment.