Open full view…

Generic union generates null

Sun, 14 Jan 2018 16:27:24 GMT

When I create a generic union type it does’not seem to work. I don’t know if it’s a bug or if I’m doing something wrong? The same code works when I’m compiling on my Mac. type Foo2 = | Bar2 of int | Baz2 let x = Bar2 3 // x is correctly Bar2 3 type Foo<'a> = | Bar of 'a | Baz let x' = Bar 3 // x' incorrectly is null