This is an automatically generated mail to inform you that tests are now 
available in t/spec/S02-polymorphic_types/subset.t

commit a0a95f0a8680e04e3ff05592e9ddd3c8f93f9d2d
Author: moritz <mor...@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date:   Tue Aug 24 11:59:22 2010 +0000

    [t/spec] tests for RT #77356, lexicals in subset declaration; also fix a 
few tests that made wrong assumptions about the scope of symbols (related to 
eval_dies_ok)
    
    git-svn-id: http://svn.pugscode.org/p...@32098 
c213334d-75ef-0310-aa23-eaa082d1ae64

diff --git a/t/spec/S02-polymorphic_types/subset.t 
b/t/spec/S02-polymorphic_types/subset.t
index b9d9e4b..7d21f7d 100644
--- a/t/spec/S02-polymorphic_types/subset.t
+++ b/t/spec/S02-polymorphic_types/subset.t
@@ -1,6 +1,6 @@
 use v6;
 use Test;
-plan 33;
+plan 37;
 
 =begin description
 
@@ -38,11 +38,11 @@ subset Digit of Int where ^10;
     is  $x,     9,  "other end of range";
 }
 
-eval_dies_ok 'my Digit $x = 10',
+dies_ok { my Digit $x = 10 },
              'type constraints prevents assignment 1';
-eval_dies_ok 'my Digit $x = -1',
-             'type constraints prevents assignment 2';
-eval_dies_ok 'my Digit $x = 3.1',
+dies_ok { my Digit $x = -1 },
+        'type constraints prevents assignment 2';
+dies_ok { my Digit $x = 3.1 },
              'original type prevents assignment';
 
 # RT #67818
@@ -148,4 +148,20 @@ eval_dies_ok 'my Digit $x = 3.1',
         'subset A of Mu + type check and assignment works';
 }
 
+# RT #77356
+#?rakudo skip 'RT 77356'
+{
+    sub limit() { 0 }
+    subset aboveLexLimit of Int where { $_ > limit() };
+    ok 1 ~~ aboveLexLimit, 'can use subset that depends on lexical sub (1)';
+    nok -1 ~~ aboveLexLimit, 'can use subset that depends on lexical sub (2)';
+}
+
+#?rakudo skip 'RT 77356'
+{
+    my $limit = 0;
+    subset aboveLexVarLimit of Int where { $_ > $limit };
+    ok 1 ~~ aboveLexVarLimit, 'can use subset that depends on lexical variable 
(1)';
+    nok -1 ~~ aboveLexVarLimit, 'can use subset that depends on lexical 
variable (2)';
+}
 # vim: ft=perl6

Reply via email to