Skip to content

Commit 9727c67

Browse files
committed
Fix synthesized-name snapshot assertions to use the array equality overload
CI compiles the snapshot round-trip and baseline reader tests with FS0193: the explicit Assert.Equal<string> type application commits overload resolution to the scalar Equal(T, T) shape while both arguments are string arrays. Use Assert.Equal<string[]>, the form the neighboring name-map tests already use, so resolution lands on the structural array comparison everywhere. Verified: FSharp.Compiler.ComponentTests builds clean; EncMethodDebugInformationTests 22 passed, 0 failed (net10.0); fantomas clean on the touched file.
1 parent ebbf20b commit 9727c67

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/FSharp.Compiler.ComponentTests/CompilerService/EncMethodDebugInformationTests.fs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ let ``Synthesized name snapshot preserves mixed bucket allocation order`` () =
204204
let decoded = deserializeSynthesizedNameSnapshot blob
205205

206206
match Map.tryFind "endpoints" decoded with
207-
| Some actualNames -> Assert.Equal<string>(expectedNames, actualNames)
207+
| Some actualNames -> Assert.Equal<string[]>(expectedNames, actualNames)
208208
| None -> failwith "expected endpoints bucket to round-trip"
209209

210210
// -----------------------------------------------------------------------
@@ -685,7 +685,7 @@ let ``Synthetic module CustomDebugInformation row round-trips synthesized snapsh
685685
match Map.tryFind "endpoints" snapshot with
686686
| Some names ->
687687
let struct (_, expectedNames) = List.head expected
688-
Assert.Equal<string>(expectedNames, names)
688+
Assert.Equal<string[]>(expectedNames, names)
689689
| None -> failwith "expected endpoints bucket"
690690
| None -> failwith "expected recorded synthesized-name snapshot"
691691

@@ -740,7 +740,7 @@ let ``Baseline reader gives recorded synthesized snapshot precedence over recons
740740
Assert.Equal(SynthesizedNameSnapshotSource.Recorded, baseline.SynthesizedNameSnapshotSource)
741741

742742
match Map.tryFind "endpoints" baseline.SynthesizedNameSnapshot with
743-
| Some names -> Assert.Equal<string>(recordedNames, names)
743+
| Some names -> Assert.Equal<string[]>(recordedNames, names)
744744
| None -> failwith "expected recorded endpoints bucket"
745745

746746
[<Fact>]

0 commit comments

Comments
 (0)