Skip to content

Commit

Permalink
Specify module __init function
Browse files Browse the repository at this point in the history
Fixes #101.
  • Loading branch information
jclark committed Jun 25, 2019
1 parent 0fdabac commit 181b801
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lang/spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -5365,6 +5365,16 @@ <h3>Function definition</h3>
An <code>external-function-body</code> means that the implementation of the
function is not provided in the Ballerina source module.
</p>
<p>
If a module has a function-defn with an identifier of <code>__init</code>, it is
called called automatically by the system at the end of the initialization of
that module; if this call returns an error, then initialization of the module
fails. The following special requirements apply to the <code>__init</code>
function of a module: it must not be declared <code>public</code>; its return
type must both be a subtype of <code>error?</code> and contain <code>()</code>;
it must have no parameters.
</p>

<h3>Service declaration</h3>

<pre
Expand Down

0 comments on commit 181b801

Please sign in to comment.