messagetemplates / messagetemplates-fsharp

Message templates - the ability to format named string values, and capture the properties
http://messagetemplates.org/
Apache License 2.0
18 stars 4 forks source link

Fix the union reflection/destructuring #18

Open adamchester opened 8 years ago

adamchester commented 8 years ago

See https://github.com/messagetemplates/messagetemplates-fsharp/commit/ec3a3cdb96a413406119c3dba83a9ee726c112a4 and https://github.com/messagetemplates/messagetemplates-fsharp/blob/ec3a3cdb96a413406119c3dba83a9ee726c112a4/test/FsMessageTemplates.Tests/FsTests.Capture.fs#L183

The outcome of the test seems to depend on which framework target we use! For example, net451 makes lang="C#" fail (if this commit is applied), whereas net452 passes!

The difference between C# and F# is confusing. The Name of second (Case2AB) is _Case2AB for F# and null for C#...