forked from dafny-lang/dafny
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support members for the new newtypes (dafny-lang#5311)
This PR adds support for members of the recently expanded newtypes. In particular, inheritance of user-defined members and built-in members (such as `.RotateLeft` for bitvector types) are handled. Under `--general-trait=full`, inheritance from both `newtype` base types and parent traits are handled. A `newtype`'s inherited members can only be figured out once the `newtype`'s base type is known. Since the base type is in general inferred, this means that member registration cannot happen until resolution has started. So, this PR moves that process from `Register...` to `Resolve...`. As part of this PR, other built-in types (`char`, `set`, ...) were added to the `valuetypeDecls` array. This has an effect on the `--rprint` output. The PR also improves some error messages (e.g., making them more consistent by using the format `type 'T'`) and removes some unused code that was left in abandoned `#if ...` directives during the resolver refresh. <small>By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
- Loading branch information
1 parent
1c63e47
commit db2d6ed
Showing
50 changed files
with
1,417 additions
and
533 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.