Skip to content

Commit

Permalink
Specification inheritance: clarification
Browse files Browse the repository at this point in the history
  • Loading branch information
btj authored Nov 16, 2020
1 parent d478e7a commit 2f5e7b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion behavioral_subtyping.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ In the literature on behavioral subtyping, some authors propose that the *effect

In this course, however, we **do not** apply specification inheritance; a method's effective specification is exactly its declared specification. (Therefore, we can speak simply of "a method's specification" without introducing ambiguity.)

We make one exception to this rule: if the Javadoc comment associated with a method M does not contain any specification clauses at all (i.e. no `@pre`, `@post`, `@throws`, `@may_throw`, `@inspects`, `@mutates`, `@mutates_properties`, `@creates`, `@immutable`, `@peerObject`, `@peerObjects`, or `@basic` clauses at all), *and* M overrides some method M' that itself overrides all other methods that M overrides, then M inherits the specification of M'.
We make one exception to this rule: if the Javadoc comment associated with a method M does not contain any specification clauses at all (i.e. no `@pre`, `@post`, `@throws`, `@may_throw`, `@inspects`, `@mutates`, `@mutates_properties`, `@creates`, `@immutable`, `@peerObject`, `@peerObjects`, or `@basic` clauses at all), *and* M overrides some method M' that itself overrides all other methods that M overrides, then we define the specification of M as being identical to the specification of M'.

## Further reading

Expand Down

0 comments on commit 2f5e7b5

Please sign in to comment.