Packages

    All the contents (such as classes and functions) of the source file are contained by the package declared. So, in the example above, the full name of is , and the full name of is .

    If the package is not specified, the contents of such a file belong to the default package that has no name.

    Additional packages are imported depending on the target platform:

    • JS:

    Apart from the default imports, each file may contain its own import directives. Syntax for imports is described in the grammar.

    or all the accessible contents of a scope (package, class, object etc):

    If there is a name clash, we can disambiguate by using as keyword to locally rename the clashing entity:

    • top-level functions and properties;
    • .

    If a top-level declaration is marked private, it is private to the file it’s declared in (see Visibility Modifiers).