September 11, 2003 typo/mistake in class.html ? | ||||
---|---|---|---|---|
| ||||
In the documentation, class.html describes an invariant function with the following example: class Date { int day; int hour; invariant() { assert(1 <= day && day <= 31); assert(0 <= hour && hour < 24); } } I believe (based on experiments with the compiler) that the () need to be left off the invariant declaration: invariant { assert(1 <= day && day <= 31); assert(0 <= hour && hour < 24); } |
September 13, 2003 Re: typo/mistake in class.html ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to A casual observer | You're right. I'll make the corrections. Thanks! |
Copyright © 1999-2021 by the D Language Foundation