Cannot compile default generic values in C# #2885
Labels
kind: bug
Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label
lang: c#
Dafny's C# transpiler and its runtime
part: code-generation
Support for transpiling Dafny to another language. If relevant, add a `lang:` tag
If you compile the following program:
You'll get a compilation error:
This comes from the fact that Dafny did not infer the type parameter of the default variable to be the same T, and there is no way to provide this in the constructor as far as I know.
The workaround is to explicit the default value for now:
The text was updated successfully, but these errors were encountered: