@@ -709,10 +709,10 @@ let rec GetIdxForTypeDef cenv key =
709709
710710let rec GetAssemblyRefAsRow cenv ( aref : ILAssemblyRef ) =
711711 AssemblyRefRow
712- (( match aref.Version with None -> 0 us | Some ( x , _, _, _ ) -> x ),
713- ( match aref.Version with None -> 0 us | Some (_, y , _, _ ) -> y ),
714- ( match aref.Version with None -> 0 us | Some (_, _, z , _ ) -> z ),
715- ( match aref.Version with None -> 0 us | Some (_, _, _, w ) -> w ),
712+ (( match aref.Version with None -> 0 us | Some ( version ) -> version.Major ),
713+ ( match aref.Version with None -> 0 us | Some ( version ) -> version.Minor ),
714+ ( match aref.Version with None -> 0 us | Some ( version ) -> version.Build ),
715+ ( match aref.Version with None -> 0 us | Some ( version ) -> version.Revision ),
716716 (( match aref.PublicKey with Some ( PublicKey _) -> 0x0001 | _ -> 0x0000 )
717717 ||| ( if aref.Retargetable then 0x0100 else 0x0000 )),
718718 BlobIndex ( match aref.PublicKey with
@@ -2822,10 +2822,10 @@ and GenExportedTypesPass3 cenv (ce: ILExportedTypesAndForwarders) =
28222822and GetManifsetAsAssemblyRow cenv m =
28232823 UnsharedRow
28242824 [| ULong m.AuxModuleHashAlgorithm
2825- UShort ( match m.Version with None -> 0 us | Some ( x , _, _, _ ) -> x )
2826- UShort ( match m.Version with None -> 0 us | Some (_, y , _, _ ) -> y )
2827- UShort ( match m.Version with None -> 0 us | Some (_, _, z , _ ) -> z )
2828- UShort ( match m.Version with None -> 0 us | Some (_, _, _, w ) -> w )
2825+ UShort ( match m.Version with None -> 0 us | Some ( version ) -> version.Major )
2826+ UShort ( match m.Version with None -> 0 us | Some ( version ) -> version.Minor )
2827+ UShort ( match m.Version with None -> 0 us | Some ( version ) -> version.Build )
2828+ UShort ( match m.Version with None -> 0 us | Some ( version ) -> version.Revision )
28292829 ULong
28302830 ( ( match m.AssemblyLongevity with
28312831 | ILAssemblyLongevity.Unspecified -> 0x0000
@@ -3091,9 +3091,8 @@ let writeILMetadataAndCode (generatePdb, desiredMetadataVersion, ilg, emitTailca
30913091
30923092 let ( mdtableVersionMajor , mdtableVersionMinor ) = metadataSchemaVersionSupportedByCLRVersion desiredMetadataVersion
30933093
3094- let version =
3095- let ( a , b , c , _ ) = desiredMetadataVersion
3096- System.Text.Encoding.UTF8.GetBytes ( sprintf " v%d .%d .%d " a b c)
3094+ let version =
3095+ System.Text.Encoding.UTF8.GetBytes ( sprintf " v%d .%d .%d " desiredMetadataVersion.Major desiredMetadataVersion.Minor desiredMetadataVersion.Build)
30973096
30983097
30993098 let paddedVersionLength = align 0x4 ( Array.length version)
@@ -3634,7 +3633,7 @@ let writeBinaryAndReportMappings (outfile,
36343633 | ILScopeRef.Module(_) -> failwith " Expected mscorlib to be ILScopeRef.Assembly was ILScopeRef.Module"
36353634 | ILScopeRef.Assembly( aref) ->
36363635 match aref.Version with
3637- | Some ( 2 us , _, _, _) -> parseILVersion " 2.0.50727.0"
3636+ | Some ( version ) when version.Major = 2 us -> parseILVersion " 2.0.50727.0"
36383637 | Some v -> v
36393638 | None -> failwith " Expected msorlib to have a version number"
36403639
0 commit comments