Skip to content

Commit 73c23ee

Browse files
committed
Replace hard tabs with spaces
1 parent 87daf4e commit 73c23ee

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

lib/Type/Nil.pod

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,26 @@ context.
1212
C<Nil>, when assigned, evaporates into the type object of the type of the
1313
container you assigned it into.
1414
15-
my Int $x = 42;
16-
$x = Nil;
17-
$x.say; # (Int)
15+
my Int $x = 42;
16+
$x = Nil;
17+
$x.say; # (Int)
1818
1919
It is for this reason that assigning an untyped container as C<Nil> will result
2020
in an C<(Any)> object.
2121
22-
my $x = Nil;
23-
$x.say; # (Any)
24-
my Int $y = $x; # error: Type check failed in assignment to '$y'; expected 'Int' but got 'Any'
22+
my $x = Nil;
23+
$x.say; # (Any)
24+
my Int $y = $x; # error: Type check failed in assignment to '$y'; expected 'Int' but got 'Any'
2525
2626
This is because an untyped container is C<Any> until proven otherwise, and
2727
the C<Nil> evaporates.
2828
2929
If you are looking for a variable which transforms objects into type objects
3030
when said variable appears on the RHS, you can type the container as C<Nil>.
3131
32-
my Nil $x;
33-
my Str $s = $x;
34-
$s.say; # (Str)
32+
my Nil $x;
33+
my Str $s = $x;
34+
$s.say; # (Str)
3535
3636
=head1 Methods
3737
@@ -48,3 +48,5 @@ Returns C<"Nil">.
4848
Returns the empty string.
4949
5050
=end pod
51+
52+
# vim: expandtab shiftwidth=4 ft=perl6

0 commit comments

Comments
 (0)