Description
int list (or any other list) is not a union type in Fable.
Repro code
open System
open FSharp.Reflection
let isUnionType (ty : Type) =
FSharpType.IsUnion(ty, true)
let isListType (ty : Type) =
ty.IsGenericType && ty.GetGenericTypeDefinition() = typedefof<list<_>>
let ty = typeof<int list>
printfn $"%b{isUnionType ty}"
printfn $"%b{isListType ty}"
Expected and actual results
Expect this in .NET and Fable:
But Fable gives:
Related information
- Fable version:
4.1.4
- Operating system:
Ubuntu 22.04
Description
int list(or any otherlist) is not a union type in Fable.Repro code
Expected and actual results
Expect this in .NET and Fable:
But Fable gives:
Related information
4.1.4Ubuntu 22.04