Skip to content

Commit 479fbfb

Browse files
committed
Signature: indentation fixes.
1 parent 01a83c9 commit 479fbfb

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

doc/Type/Signature.pod6

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -386,17 +386,17 @@ variables was a type object with such a constraint, which is not initializeable,
386386
thus you cannot use the C<.=> operator, for example.
387387
388388
=for code :solo
389-
use v6.c;
390-
my Int:D $x .= new: 42;
391-
# OUTPUT: You cannot create an instance of this type (Int:D)
392-
# in block <unit> at -e line 1
389+
use v6.c;
390+
my Int:D $x .= new: 42;
391+
# OUTPUT: You cannot create an instance of this type (Int:D)
392+
# in block <unit> at -e line 1
393393
394394
In the 6.d language, the default default is the type object without the smiley
395395
constraint:
396396
397397
=for code :solo
398-
use v6.d;
399-
my Int:D $x .= new: 42; # OUTPUT: «42␤»
398+
use v6.d;
399+
my Int:D $x .= new: 42; # OUTPUT: «42␤»
400400
401401
A closing remark on terminology: this section is about the use of the type
402402
smileys C<:D> and C<:U> to constrain the definiteness of arguments.
@@ -504,31 +504,31 @@ as C«-->» with the caveat that this form does not work with constant values. Y
504504
cannot use it in a block either. That is why the pointy arrow form is always
505505
preferred.
506506
507-
=for code
508-
sub greeting(Str $name) returns Str { say "Hello, $name" } # Valid
507+
=for code
508+
sub greeting(Str $name) returns Str { say "Hello, $name" } # Valid
509509
510-
=for code :skip-test<compile time error>
511-
sub favorite-number returns 42 { } # This will fail.
510+
=for code :skip-test<compile time error>
511+
sub favorite-number returns 42 { } # This will fail.
512512
513513
=head4 C<of>
514514
515515
C<of> is just the real name of the C<returns> keyword.
516516
517-
=for code
518-
sub foo() of Int { 42 }; # Valid
517+
=for code
518+
sub foo() of Int { 42 }; # Valid
519519
520-
=for code :skip-test<compile time error>
521-
sub foo() of 42 { }; # This will fail.
520+
=for code :skip-test<compile time error>
521+
sub foo() of 42 { }; # This will fail.
522522
523523
=head4 prefix(C-like) form
524524
525525
This is similar to placing type constraints on variables like C<my Type $var =
526526
20;>, except the C<$var> is a definition for a routine.
527527
528-
=for code
529-
my Int sub bar { 1 }; # Valid
530-
=for code :skip-test<compile time error>
531-
my 42 sub bad-answer {}; # This will fail.
528+
=for code
529+
my Int sub bar { 1 }; # Valid
530+
=for code :skip-test<compile time error>
531+
my 42 sub bad-answer {}; # This will fail.
532532
533533
=head3 X<Coercion type>
534534

0 commit comments

Comments
 (0)