File tree Expand file tree Collapse file tree 2 files changed +14
-19
lines changed
tests/FSharp.Compiler.ComponentTests/Signatures Expand file tree Collapse file tree 2 files changed +14
-19
lines changed Original file line number Diff line number Diff line change @@ -4220,20 +4220,18 @@ module TcDeclarations =
42204220 | Result res ->
42214221 // Update resolved type parameters with the names from the source.
42224222 let _ , tcref , _ = res
4223-
4224- // Disabled to allow deterministic parallel type checking. See https://github.com/dotnet/fsharp/issues/19033
4225- // TODO: mutating typar here can lead to a race during parallel type checking.
4226- // Some type extensions can end up with a wrong type argument name.
4227- // This will break deterministic builds.
42284223
4229- //if tcref.TyparsNoRange.Length = synTypars.Length then
4230- // (tcref.TyparsNoRange, synTypars)
4231- // ||> List.zip
4232- // |> List.iter (fun (typar, SynTyparDecl.SynTyparDecl (typar = tp)) ->
4233- // let (SynTypar(ident = untypedIdent; staticReq = sr)) = tp
4234- // if typar.StaticReq = sr then
4235- // typar.SetIdent(untypedIdent)
4236- // )
4224+ if tcref.TyparsNoRange.Length = synTypars.Length then
4225+ ( tcref.TyparsNoRange, synTypars)
4226+ ||> List.zip
4227+ |> List.iter ( fun ( typar , SynTyparDecl.SynTyparDecl ( typar = tp )) ->
4228+ let ( SynTypar ( ident = untypedIdent; staticReq = sr)) = tp
4229+ if typar.StaticReq = sr then
4230+ // TODO: mutating typar here can lead to a race during parallel type checking.
4231+ // Some type extensions can end up with a wrong type argument name.
4232+ // This will break deterministic builds.
4233+ typar.SetIdent( untypedIdent)
4234+ )
42374235
42384236 tcref
42394237
Original file line number Diff line number Diff line change @@ -76,8 +76,7 @@ namespace Foo.Types
7676
7777 val EndColumn: int"""
7878
79- // See https://github.com/dotnet/fsharp/issues/19033
80- [<Fact( Skip= " needs fixing" ) >]
79+ [<Fact>]
8180let ``Type extension uses type parameters names from source`` () =
8281 FSharp """
8382module Extensions
@@ -94,8 +93,7 @@ type List<'E> with
9493
9594 member X: 'E"""
9695
97- // See https://github.com/dotnet/fsharp/issues/19033
98- [<Fact( Skip= " needs fixing" ) >]
96+ [<Fact>]
9997let ``Type extension with constraints uses type parameters names from source`` () =
10098 FSharp """
10199module Extensions
@@ -112,8 +110,7 @@ type Map<'K,'V when 'K: comparison> with
112110
113111 member X: t: 'T -> k: 'K -> 'K option * ({| n: 'K array |} * int) when 'K: comparison"""
114112
115- // See https://github.com/dotnet/fsharp/issues/19033
116- [<Fact( Skip= " needs fixing" ) >]
113+ [<Fact>]
117114let ``Type extension with lowercase type parameters names from source`` () =
118115 FSharp """
119116module Extensions
You can’t perform that action at this time.
0 commit comments