@@ -773,11 +773,17 @@ module TypeHelpers =
773773 dict [ " bool`1" , Choice1Of2 Fable.Boolean
774774 " byte`1" , Choice1Of2 ( Fable.Number UInt8)
775775 " string`1" , Choice1Of2 Fable.String
776- " uint64`1" , Choice2Of2( " System.Runtime" , Types.uint64)
777- " Guid`1" , Choice2Of2( " System.Runtime" , Types.guid)
778- " TimeSpan`1" , Choice2Of2( " System.Runtime" , Types.timespan)
779- " DateTime`1" , Choice2Of2( " System.Runtime" , Types.datetime)
780- " DateTimeOffset`1" , Choice2Of2( " System.Runtime" , Types.datetimeOffset)]
776+ " uint64`1" , Choice2Of2 Types.uint64
777+ " Guid`1" , Choice2Of2 Types.guid
778+ " TimeSpan`1" , Choice2Of2 Types.timespan
779+ " DateTime`1" , Choice2Of2 Types.datetime
780+ " DateTimeOffset`1" , Choice2Of2 Types.datetimeOffset]
781+
782+ let private makeSystemRuntimeType fullName =
783+ let r : Fable.EntityRef =
784+ { FullName = fullName
785+ Path = Fable.CoreAssemblyName " System.Runtime" }
786+ Fable.DeclaredType( r, [])
781787
782788 let makeTypeFromDef ctxTypeArgs ( genArgs : IList < FSharpType >) ( tdef : FSharpEntity ) =
783789 if tdef.IsArrayType then
@@ -801,16 +807,14 @@ module TypeHelpers =
801807 | Types.resizeArray -> makeGenArgs ctxTypeArgs genArgs |> List.head |> Fable.Array
802808 | Types.list -> makeGenArgs ctxTypeArgs genArgs |> List.head |> Fable.List
803809 | DicContains numberTypes kind -> Fable.Number kind
810+ | " Microsoft.FSharp.Core.int64`1" -> makeSystemRuntimeType Types.int64
811+ | " Microsoft.FSharp.Core.decimal`1" -> makeSystemRuntimeType Types.decimal
804812 // TODO: FCS doesn't expose the abbreviated type of a MeasureAnnotatedAbbreviation,
805813 // so we need to hard-cde FSharp.UMX types
806814 | Naming.StartsWith " FSharp.UMX." ( DicContains fsharpUMX choice) ->
807815 match choice with
808816 | Choice1Of2 t -> t
809- | Choice2Of2( dllName, fullName) ->
810- let r : Fable.EntityRef =
811- { FullName = fullName
812- Path = Fable.CoreAssemblyName dllName }
813- Fable.DeclaredType( r, [])
817+ | Choice2Of2 fullName -> makeSystemRuntimeType fullName
814818 | _ ->
815819 // Special attributes
816820 tdef.Attributes |> tryPickAttribute [
0 commit comments