0.16.3
-
motoko (
moc)-
Added
Prim.getSelfPrincipal<system>() : Principalto get the principal of the current actor (#5518). -
EXPERIMENTAL: Contextual dot notation (#5458):
Writinge0.f(<Ts>)(e1,...,en)is short-hand forM.f(<Ts>)(e0, e1, ..., en), provided:fis not already a field or special member ofe0.- There is a unique module
Mwith memberfin the context that declares:- a public type
Self<T1,..., Tn>that can be instantiated to the type ofe0; - a public field
fthat accepts(e0, e2, ..., en)as arguments.
- a public type
-
Added an optional warning for redundant type instantiations in generic function calls (#5468).
Note that this warning is off by default.
It can be enabled with the-W M0223flag. -
Added
-Aand-Wflags to disable and enable warnings given their message codes (#5496).For example, to disable the warning for redundant
stablekeyword, use-A M0217.
To enable the warning for redundant type instantiations, use-W M0223.
Multiple warnings can be disabled or enabled by comma-separating the message codes, e.g.-A M0217,M0218.
Both flags can be used multiple times. -
Added
-Eflag to treat specified warnings as errors given their message codes (#5502). -
Added
--warn-helpflag to show available warning codes, current lint level (Allowed, Warn or Error), and descriptions (#5502). -
moc.js: AddedsetExtraFlagsmethod for passing some of themocflags (#5506).
-