Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An opaque type should only be export-provided #2098

Open
RustanLeino opened this issue May 5, 2022 · 0 comments
Open

An opaque type should only be export-provided #2098

RustanLeino opened this issue May 5, 2022 · 0 comments
Labels
part: resolver Resolution and typechecking

Comments

@RustanLeino
Copy link
Collaborator

Currently, Dafny allows an opaque type to be listed both in the provides list and the reveals list of an export set. There's no difference between these two. Therefore, to be consistent with other restrictions, it seems logical to forbid an opaque type from being listed in a reveals clause. (Ror example, compare with a method declaration, which is not allowed in a reveals clause.)

Example:

module M {
  export A
    provides OpaqueType
  export B
    reveals OpaqueType // this ought not to be allowed

  type OpaqueType
}
@RustanLeino RustanLeino added the part: resolver Resolution and typechecking label May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
part: resolver Resolution and typechecking
Projects
None yet
Development

No branches or pull requests

1 participant