@@ -154,6 +154,7 @@ let GetRangeOfDiagnostic(err:PhasedDiagnostic) =
154154| InterfaceNotRevealed(_, _, m)
155155| WrappedError(_, m)
156156| PatternMatchCompilation.MatchIncomplete(_, _, m)
157+ | PatternMatchCompilation.EnumMatchIncomplete(_, _, m)
157158| PatternMatchCompilation.RuleNeverMatched m
158159| ValNotMutable(_, _, m)
159160| ValNotLocal(_, _, m)
@@ -355,6 +356,7 @@ let GetDiagnosticNumber(err:PhasedDiagnostic) =
355356| ExtensionTyping.ProvidedTypeResolutionNoRange_
356357| ExtensionTyping.ProvidedTypeResolution_ -> 103
357358#endif
359+ | PatternMatchCompilation.EnumMatchIncomplete_ -> 104
358360(* DO NOT CHANGE THE NUMBERS*)
359361
360362// Strip TargetInvocationException wrappers
@@ -560,6 +562,7 @@ let MatchIncomplete2E() = DeclareResourceString("MatchIncomplete2", "%s")
560562let MatchIncomplete3E () = DeclareResourceString( " MatchIncomplete3" , " %s " )
561563let MatchIncomplete4E () = DeclareResourceString( " MatchIncomplete4" , " " )
562564let RuleNeverMatchedE () = DeclareResourceString( " RuleNeverMatched" , " " )
565+ let EnumMatchIncomplete1E () = DeclareResourceString( " EnumMatchIncomplete1" , " " )
563566let ValNotMutableE () = DeclareResourceString( " ValNotMutable" , " %s " )
564567let ValNotLocalE () = DeclareResourceString( " ValNotLocal" , " " )
565568let Obsolete1E () = DeclareResourceString( " Obsolete1" , " " )
@@ -1402,6 +1405,15 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) =
14021405if isCompthen
14031406 os.Append( MatchIncomplete4E() .Format) |> ignore
14041407
1408+ | PatternMatchCompilation.EnumMatchIncomplete( isComp, cexOpt, _) ->
1409+ os.Append( EnumMatchIncomplete1E() .Format) |> ignore
1410+ match cexOptwith
1411+ | None-> ()
1412+ | Some( cex, false ) -> os.Append( MatchIncomplete2E() .Format cex) |> ignore
1413+ | Some( cex, true ) -> os.Append( MatchIncomplete3E() .Format cex) |> ignore
1414+ if isCompthen
1415+ os.Append( MatchIncomplete4E() .Format) |> ignore
1416+
14051417| PatternMatchCompilation.RuleNeverMatched_ -> os.Append( RuleNeverMatchedE() .Format) |> ignore
14061418
14071419| ValNotMutable(_, valRef, _) -> os.Append( ValNotMutableE() .Format( valRef.DisplayName)) |> ignore
@@ -2084,7 +2096,7 @@ type IRawFSharpAssemblyData =
20842096abstract GetInternalsVisibleToAttributes : ILGlobals -> string list
20852097/// The raw IL module definition in the assembly, if any. This is not present for cross-project references
20862098/// in the language service
2087- abstract TryGetRawILModule :unit -> ILModuleDef option
2099+ abstract TryGetILModuleDef :unit -> ILModuleDef option
20882100/// The raw F# signature data in the assembly, if any
20892101abstract GetRawFSharpSignatureData : range * ilShortAssemName : string * fileName : string -> ( string * byte []) list
20902102/// The raw F# optimization data in the assembly, if any
@@ -2322,9 +2334,6 @@ type TcConfigBuilder =
23222334 isInvalidationSupported: bool
23232335
23242336/// used to log sqm data
2325- mutable sqmSessionGuid: System .Guid option
2326- mutable sqmNumOfSourceFiles: int
2327- sqmSessionStartedTime: int64
23282337
23292338/// if true - every expression in quotations will be augmented with full debug info (filename, location in file)
23302339mutable emitDebugInfoInQuotations: bool
@@ -2472,9 +2481,6 @@ type TcConfigBuilder =
24722481 noDebugData= false
24732482 isInteractive= false
24742483 isInvalidationSupported= false
2475- sqmSessionGuid= None
2476- sqmNumOfSourceFiles= 0
2477- sqmSessionStartedTime= System.DateTime.UtcNow.Ticks
24782484 emitDebugInfoInQuotations= false
24792485 exename= None
24802486 copyFSharpCore= CopyFSharpCoreFlag.No
@@ -2943,9 +2949,6 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) =
29432949member x.isInteractive = data.isInteractive
29442950member x.isInvalidationSupported = data.isInvalidationSupported
29452951member x.emitDebugInfoInQuotations = data.emitDebugInfoInQuotations
2946- member x.sqmSessionGuid = data.sqmSessionGuid
2947- member x.sqmNumOfSourceFiles = data.sqmNumOfSourceFiles
2948- member x.sqmSessionStartedTime = data.sqmSessionStartedTime
29492952member x.copyFSharpCore = data.copyFSharpCore
29502953member x.shadowCopyReferences = data.shadowCopyReferences
29512954member x.tryGetMetadataSnapshot = data.tryGetMetadataSnapshot
@@ -3822,7 +3825,7 @@ type RawFSharpAssemblyDataBackedByFileOnDisk (ilModule: ILModuleDef, ilAssemblyR
38223825interface IRawFSharpAssemblyDatawith
38233826member __.GetAutoOpenAttributes ( ilg ) = GetAutoOpenAttributes ilg ilModule
38243827member __.GetInternalsVisibleToAttributes ( ilg ) = GetInternalsVisibleToAttributes ilg ilModule
3825- member __.TryGetRawILModule () = Some ilModule
3828+ member __.TryGetILModuleDef () = Some ilModule
38263829member __.GetRawFSharpSignatureData ( m , ilShortAssemName , filename ) =
38273830let resources = ilModule.Resources.AsList
38283831let sigDataReaders =
@@ -4090,6 +4093,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti
40904093 FileName= Some fileName
40914094 MemberSignatureEquality= ( fun ty1 ty2 -> Tastops.typeEquivAux EraseAll g ty1 ty2)
40924095 ImportProvidedType= ( fun ty -> Import.ImportProvidedType( tcImports.GetImportMap()) m ty)
4096+ TryGetILModuleDef= ( fun () -> Some ilModule)
40934097 TypeForwarders= Map.empty}
40944098
40954099let ccu = CcuThunk.Create( ilShortAssemName, ccuData)
@@ -4392,8 +4396,8 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti
43924396member tcImports.PrepareToImportReferencedILAssembly ( ctok , m , filename , dllinfo : ImportedBinary ) =
43934397 CheckDisposed()
43944398let tcConfig = tcConfigP.Get( ctok)
4395- assert dllinfo.RawMetadata.TryGetRawILModule () .IsSome
4396- let ilModule = dllinfo.RawMetadata.TryGetRawILModule () .Value
4399+ assert dllinfo.RawMetadata.TryGetILModuleDef () .IsSome
4400+ let ilModule = dllinfo.RawMetadata.TryGetILModuleDef () .Value
43974401let ilScopeRef = dllinfo.ILScopeRef
43984402let aref =
43994403match ilScopeRefwith
@@ -4441,7 +4445,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti
44414445let ccuRawDataAndInfos =
44424446 ilModule.GetRawFSharpSignatureData( m, ilShortAssemName, filename)
44434447|> List.map( fun ( ccuName , sigDataReader ) ->
4444- let data = GetSignatureData( filename, ilScopeRef, ilModule.TryGetRawILModule (), sigDataReader)
4448+ let data = GetSignatureData( filename, ilScopeRef, ilModule.TryGetILModuleDef (), sigDataReader)
44454449
44464450let optDatas = Map.ofList optDataReaders
44474451
@@ -4466,6 +4470,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti
44664470 IsProviderGenerated= false
44674471 ImportProvidedType= ( fun ty -> Import.ImportProvidedType( tcImports.GetImportMap()) m ty)
44684472#endif
4473+ TryGetILModuleDef= ilModule.TryGetILModuleDef
44694474 UsesFSharp20PlusQuotations= minfo.usesQuotations
44704475 MemberSignatureEquality= ( fun ty1 ty2 -> Tastops.typeEquivAux EraseAll( tcImports.GetTcGlobals()) ty1 ty2)
44714476 TypeForwarders= ImportILAssemblyTypeForwarders( tcImports.GetImportMap, m, ilModule.GetRawTypeForwarders()) }
@@ -4479,7 +4484,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti
44794484if verbosethen dprintf" *** no optimization data for CCU%s , was DLL compiled with --no-optimization-data??\n " ccuName
44804485 None
44814486| Some info->
4482- let data = GetOptimizationData( filename, ilScopeRef, ilModule.TryGetRawILModule (), info)
4487+ let data = GetOptimizationData( filename, ilScopeRef, ilModule.TryGetILModuleDef (), info)
44834488let res = data.OptionalFixup( fun nm -> availableToOptionalCcu( tcImports.FindCcu( ctok, m, nm, lookupOnly= false )))
44844489if verbosethen dprintf" found optimization data for CCU%s \n " ccuName
44854490 Some res)
@@ -4496,7 +4501,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti
44964501 ILScopeRef= ilScopeRef}
44974502let phase2 () =
44984503#if ! NO_ EXTENSIONTYPING
4499- match ilModule.TryGetRawILModule () with
4504+ match ilModule.TryGetILModuleDef () with
45004505| None-> () // no type providers can be used without a real IL Module present
45014506| Some ilModule->
45024507 ccuinfo.TypeProviders<- tcImports.ImportTypeProviderExtensions( ctok, tcConfig, filename, ilScopeRef, ilModule.ManifestOfAssembly.CustomAttrs.AsList, ccu.Contents, invalidateCcu, m)
@@ -5364,6 +5369,7 @@ let GetInitialTcState(m, ccuName, tcConfig:TcConfig, tcGlobals, tcImports:TcImpo
53645369 IsProviderGenerated= false
53655370 ImportProvidedType= ( fun ty -> Import.ImportProvidedType( tcImports.GetImportMap()) m ty)
53665371#endif
5372+ TryGetILModuleDef= ( fun () -> None)
53675373 FileName= None
53685374 Stamp= newStamp()
53695375 QualifiedName= None