Add a test for RT #50421
gfx [Tue, 13 Oct 2009 07:37:53 +0000 (16:37 +0900)]
t/900_bug/003_RT50421.t [new file with mode: 0644]

diff --git a/t/900_bug/003_RT50421.t b/t/900_bug/003_RT50421.t
new file mode 100644 (file)
index 0000000..8950508
--- /dev/null
@@ -0,0 +1,42 @@
+#!/usr/bin/perl -w
+use Test;
+
+plan tests => 3;
+
+{
+    package Class;
+    sub new {}
+}
+
+{
+    package MouseClass;
+    use Mouse;
+}
+
+
+{
+    package Foo;
+
+    use Mouse;
+
+    has unknown => (
+        is  => 'rw',
+        isa => 'HashRef[Unknown]'
+    );
+
+    has class   => (
+        is      => 'rw',
+        isa     => 'HashRef[Class]',
+    );
+
+    has mouse   => (
+        is      => 'rw',
+        isa     => 'HashRef[MouseClass]',
+    );
+}
+
+
+my $obj = Foo->new;
+ok eval { $obj->unknown({}); };
+ok eval { $obj->class({}); };
+ok eval { $obj->mouse({}); };