Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Spec: Refine the opt rule (dfinity#246)
* SpeC: Refine the opt rule this writes the rules out as described in dfinity#168 (comment) I believe that this is necessary for completeness, as shown by this table, which checks that `t <: opt t'` is covered: ``` | null <: t | null <: t' | t <: t' | Rule? | --- | --- | --- | --- | | no | no | no | second rule | no | no | yes | first rule | no | yes | no | third rule | no | yes | yes | third rule | yes | no | no | second rule | yes | no | yes | impossible (<: is transitive) | yes | yes | no | see rules for `t = null`, `t = opt …` or `t = reserved` | yes | yes | yes | see rules for `t = null`, `t = opt …` or `t = reserved` ``` Remember that `null <: t` implies that `t = null`, `t = opt …` or `t = reserved`, and these cases have their own rules. Fixes dfinity#239. * null <: t' Co-authored-by: Yan Chen <yan.chen@dfinity.org> Co-authored-by: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com>
- Loading branch information