From 8cf075442e847620c183af5dde405103c15cfc78 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Fri, 28 Oct 2022 08:23:28 +0100 Subject: [PATCH] fix metadata failure due to double integration of signature (#14189) * fix metadata failure due to double duplication * fix metadata failure due to double duplication --- src/Compiler/Driver/ParseAndCheckInputs.fs | 36 +++------------------- 1 file changed, 4 insertions(+), 32 deletions(-) diff --git a/src/Compiler/Driver/ParseAndCheckInputs.fs b/src/Compiler/Driver/ParseAndCheckInputs.fs index 155696239e5..b63976cb7d5 100644 --- a/src/Compiler/Driver/ParseAndCheckInputs.fs +++ b/src/Compiler/Driver/ParseAndCheckInputs.fs @@ -1159,26 +1159,6 @@ let AddCheckResultsToTcState ccuSigForFile, tcState -let AddDummyCheckResultsToTcState - ( - tcGlobals, - amap, - qualName: QualifiedNameOfFile, - prefixPathOpt, - tcSink, - tcState: TcState, - tcStateForImplFile: TcState, - rootSig - ) = - let hadSig = true - let emptyImplFile = CreateEmptyDummyImplFile qualName rootSig - let tcEnvAtEnd = tcStateForImplFile.TcEnvFromImpls - - let ccuSigForFile, tcState = - AddCheckResultsToTcState (tcGlobals, amap, hadSig, prefixPathOpt, tcSink, tcState.tcsTcImplEnv, qualName, rootSig) tcState - - (tcEnvAtEnd, EmptyTopAttrs, Some emptyImplFile, ccuSigForFile), tcState - /// Typecheck a single file (or interactive entry into F# Interactive) let CheckOneInputAux ( @@ -1347,18 +1327,10 @@ let CheckOneInput match partialResult with | Choice1Of2 result -> return result, tcState - | Choice2Of2 (amap, _conditionalDefines, rootSig, _priorErrors, file, tcStateForImplFile, _ccuSigForFile) -> - return - AddDummyCheckResultsToTcState( - tcGlobals, - amap, - file.QualifiedName, - prefixPathOpt, - tcSink, - tcState, - tcStateForImplFile, - rootSig - ) + | Choice2Of2 (_amap, _conditionalDefines, rootSig, _priorErrors, file, tcStateForImplFile, ccuSigForFile) -> + let emptyImplFile = CreateEmptyDummyImplFile file.QualifiedName rootSig + let tcEnvAtEnd = tcStateForImplFile.TcEnvFromImpls + return (tcEnvAtEnd, EmptyTopAttrs, Some emptyImplFile, ccuSigForFile), tcState } // Within a file, equip loggers to locally filter w.r.t. scope pragmas in each input