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

Predicate subtype of bounded type parameter verifies but build fails #5881

Open
erniecohen opened this issue Oct 31, 2024 · 0 comments
Open
Labels
kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label

Comments

@erniecohen
Copy link

Dafny version

4.9.0

Code to produce this issue

type Unique<T(!new)> = t:T | true witness *
trait IntOps<T(!new)> {
    predicate le(x:T,y:T)
}
datatype Int<T(!new),O(!new) extends IntOps<T>> = Int(t:T, o_:Unique<O>) { 
    const o := o_ as IntOps<T>
}

Command to run and resulting output

dafny run --general-traits:datatype --type-system-refresh

What happened?

ailed to compile C# source code using ...
error CS0030: Cannot convert type 'O' to '__O'

What type of operating system are you experiencing the problem on?

Mac

@erniecohen erniecohen added the kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label label Oct 31, 2024
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
Projects
None yet
Development

No branches or pull requests

1 participant