File tree Expand file tree Collapse file tree 3 files changed +47
-1
lines changed
tests/ParallelTypeCheckingTests/Tests Expand file tree Collapse file tree 3 files changed +47
-1
lines changed Original file line number Diff line number Diff line change @@ -1479,7 +1479,8 @@ let CheckOneInputAux'
14791479 // printfn $"Finished Processing Sig {file.FileName}"
14801480 return
14811481 fun isFinalFold tcState ->
1482- // printfn $"Applying Sig {file.FileName}"
1482+ printfn $" Applying Sig {file.FileName} (final: {isFinalFold})"
1483+
14831484 let fsiPartialResult , tcState =
14841485 let rootSigs = Zmap.add qualNameOfFile sigFileType tcState.tcsRootSigs
14851486
@@ -1504,6 +1505,9 @@ let CheckOneInputAux'
15041505 if isFinalFold then
15051506 fsiPartialResult, tcState
15061507 else
1508+ // Train of thought: I'm not sure you want to add the results to the tcState,
1509+ // when this function is called right before it will check the implementation file.
1510+
15071511 // Update the TcEnv of implementation files to also contain the signature data.
15081512 let _ccuSigForFile , tcState =
15091513 AddCheckResultsToTcState
Original file line number Diff line number Diff line change @@ -549,4 +549,32 @@ let fn (a: A) = ()
549549"""
550550 ( set [| 0 |])
551551 ]
552+ scenario
553+ " Implementation uses something defined above and in signature"
554+ [
555+ sourceFile
556+ " A.fsi"
557+ """
558+ module Bar
559+
560+ type Bar =
561+ new: unit -> Bar
562+ static member Foo: unit -> unit
563+
564+ val Foo: unit -> unit
565+ """
566+ Set.empty
567+ sourceFile
568+ " B.fs"
569+ """
570+ module Barry
571+
572+ type Barry() =
573+ static member Foo () : unit =
574+ failwith ""
575+
576+ let Foo () : unit =
577+ Barry.Foo ()
578+ """
579+ ( set [| 0 |])
552580 ]
Original file line number Diff line number Diff line change @@ -303,6 +303,20 @@ let ``Compile a valid scenario using graph-based type-checking`` (scenario: Scen
303303 Project = project
304304 }
305305
306+ [<TestCaseSource( nameof scenarios) >]
307+ let ``Compile a valid scenario using parallel backed implementation files type - checking`` ( scenario : Scenario ) =
308+ let project =
309+ scenario.Files
310+ |> Array.map ( fun ( f : FileInScenario ) -> f.FileWithAST.File, f.Content)
311+ |> List.ofArray
312+ |> FProject.Make CompileOutput.Library
313+
314+ compileAValidProject
315+ {
316+ Method = Method.ParallelCheckingOfBackedImplFiles
317+ Project = project
318+ }
319+
306320[<TestCaseSource( nameof scenarios) >]
307321let ``Compile a valid scenario using sequential type - checking`` ( scenario : Scenario ) =
308322 let project =
You can’t perform that action at this time.
0 commit comments