Borislav Kosharov wrote:
Speaking of contracts, and reading the docs I see:
"Pre and Post Contracts
The pre contracts specify the preconditions before a statement
is executed. The most typical use of this would be in
validating the parameters to a function. The post contracts
validate the result of the statement. The most typical use of
this would be in validating the return value of a function and
of any side effects it has..."
So are contracts possible outside function declarations? For
example just scopes or random places in code.
They should not be. Other than the 'invariant' which is on the
class/interface.