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.
1 parent 0809d2f commit 31f5bebCopy full SHA for 31f5beb
doc/Language/typesystem.pod6
@@ -27,7 +27,21 @@ method C<.defined> can be overloaded and may provide false information.
27
28
=head1 Type Declarators
29
30
-TODO
+Type declarators introduce a new type into the given scope. Nested scopes can
31
+be separated by C<::>. New L<packages|/language/packages> are created
32
+automatically if no such scope exists already.
33
+
34
+ class Foo::Bar::C {};
35
+ put Foo::Bar::.keys;
36
+ # OUTPUT«C»
37
38
+X«|... (forward declaration)»
39
+X«Forward declarations» can be provided with a block containing only C<...>. The
40
+compiler will check at the end of the current scope if the type is defined.
41
42
+ class C {...}
43
+ # many lines later
44
+ class C { has $.attr }
45
46
=head2 C<class>
47
0 commit comments