contracts for interface properties?
Posted: Sun Oct 17, 2010 9:05 am
Hi,
I am playing around with contracts and can't get the following code to run:
The error I get is
It seems contracts are not supported in interfaces or abstract classes. Is that correct?
Regards,
blubb
I am playing around with contracts and can't get the following code to run:
interface Food
get healthValue as int
ensure result > 0
The error I get is
- Code: Select all
oops.cobra(4,9): error: Expecting DEDENT, but got "ensure" instead.
Compilation failed - 1 error, 0 warnings
It seems contracts are not supported in interfaces or abstract classes. Is that correct?
Regards,
blubb