Datatype erasure and traits don't play together #5233
Labels
kind: bug
Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label
part: code-generation
Support for transpiling Dafny to another language. If relevant, add a `lang:` tag
Dafny version
4.5.0
Code to produce this issue
Command to run and resulting output
What happened?
Since the datatype has 1 constructor with 1 argument, the compiler optimizes
Dt
to be just that argument. But this optimization should be used only if the datatype does not implement any traits.What type of operating system are you experiencing the problem on?
Mac
The text was updated successfully, but these errors were encountered: