We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
my @A of int
1 parent 7e9a101 commit dc03e10Copy full SHA for dc03e10
S09-typed-arrays/native-decl.t
@@ -1,12 +1,17 @@
1
use Test;
2
3
-plan 8;
+plan 10;
4
5
{
6
my int @is;
7
ok @is ~~ array[int], 'my int @x gives a native int array';
8
}
9
10
+{
11
+ my @is of int;
12
+ ok @is ~~ array[int], 'my @x of int gives a native int array';
13
+}
14
+
15
16
my int @is = 1..10;
17
is @is.elems, 10, 'Can initialize an int array at declaration (1)';
@@ -19,6 +24,11 @@ plan 8;
19
24
ok @ns ~~ array[num], 'my int @x gives a native num array';
20
25
21
26
27
28
+ my @ns of num;
29
+ ok @ns ~~ array[num], 'my @x of num gives a native num array';
30
31
22
32
23
33
my num @ns = 1e0..10e0;
34
is @ns.elems, 10, 'Can initialize a num array at declaration (1)';
0 commit comments