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

Reveal lemmas are not copied from traits to extending classes, leading to resolution errors #2612

Closed
cpitclaudel opened this issue Aug 18, 2022 · 3 comments · Fixed by #2974
Labels
kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label part: resolver Resolution and typechecking

Comments

@cpitclaudel
Copy link
Member

trait T {
  predicate {:opaque} True() { true }
}

class C extends T {}
bug.dfy(5,6): Error: class 'C' does not implement trait lemma 'T.reveal_True'

(CC @fabiomadge FYI)

@cpitclaudel cpitclaudel added kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label part: resolver Resolution and typechecking has-workaround: no There are no known workarounds labels Aug 18, 2022
@fabiomadge
Copy link
Collaborator

I think that's by design.

} else if (!RefinementToken.IsInherited(function.tok, c.EnclosingModuleDefinition)) {

@cpitclaudel
Copy link
Member Author

I wonder if that was instead due to some code that previously copied those, so that they wouldn't be regenerated?

@MikaelMayer
Copy link
Member

MikaelMayer commented Oct 3, 2022

My workaround:

trait T {
  predicate {:opaque} True() { true }
}

class C extends T {
  lemma reveal_True() {}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label part: resolver Resolution and typechecking
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants