csharp-algebraictypes
csharp-algebraictypes copied to clipboard
Variant names can not contain digit characters
Description
Generator fails when variants contain digits.
Repro steps
Please provide the steps required to reproduce the problem
- Define a sum type as follows:
union Choice<T,U> { Choice1Of2<T>, Choice2Of2<U> }
.
Expected behavior
Produces appropriate Choice
, Choice1Of2
, and Choice2Of2
classes.
Actual behavior
Fails silently on command-line. If Run Custom Tool
is chosen in Visual Studio 2015, display a dialog box with a parsing error.
Known workarounds
Don't use digit characters (0-9) in variant names. In other words, union Choice<T,U> { ChoiceOne<T>, ChoiceTwo<U> }
will work just fine.
Related information
- Windows 10 (64-bit)
- 1.0 release
- .NET Runtime v4.6.1