Maybe.
Under the Family Law Act such a contract can be set aside under certain circumstances and under the Succession Law Reform Act, a contract is only one factor taken into account when a judge decides whether or not to make a support order for a dependant.
For more information about this question please see this detailed article or a summary published in The Jewish Tribune.