Skip to content

Commit ff2a3e6

Browse files
Run IL spread tests only against .NET (Core)
The compiler emits various types from the System.Diagnostics.CodeAnalysis namespace for the .NET Framework target, but those types come from the runtime for the .NET (Core) target. Since the only IL that is material here is the field names, types, and ordering, and since the spread logic is entirely framework/runtime-agnostic, it is simpler to run these tests only for the .NET (Core) target.
1 parent 18c61a2 commit ff2a3e6

File tree

4 files changed

+23
-4
lines changed

4 files changed

+23
-4
lines changed

tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/AnonymousRecordExpressionSpreads.fs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@ module EmittedIL.AnonymousRecordExpressionSpreads
22

33
open FSharp.Test
44
open FSharp.Test.Compiler
5-
open Xunit
5+
6+
/// Various types in the System.Diagnostics.CodeAnalysis namespace will be generated by the compiler
7+
/// for the Framework target but will be included in the runtime for the .NET (Core) target.
8+
/// Since the only IL that is material here is the field names, types, and ordering,
9+
/// and since the spread logic is entirely framework/runtime-agnostic,
10+
/// it is simpler to run these tests only for the .NET (Core) target.
11+
type TheoryAttribute = TheoryForNETCOREAPPAttribute
612

713
let [<Literal>] SupportedLangVersion = "preview"
814

tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/NominalRecordExpressionSpreads.fs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@ module EmittedIL.NominalRecordExpressionSpreads
22

33
open FSharp.Test
44
open FSharp.Test.Compiler
5-
open Xunit
5+
6+
/// Various types in the System.Diagnostics.CodeAnalysis namespace will be generated by the compiler
7+
/// for the Framework target but will be included in the runtime for the .NET (Core) target.
8+
/// Since the only IL that is material here is the field names, types, and ordering,
9+
/// and since the spread logic is entirely framework/runtime-agnostic,
10+
/// it is simpler to run these tests only for the .NET (Core) target.
11+
type TheoryAttribute = TheoryForNETCOREAPPAttribute
612

713
let [<Literal>] SupportedLangVersion = "preview"
814

tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/RecordTypeSpreads.fs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@ module EmittedIL.RecordTypeSpreads
22

33
open FSharp.Test
44
open FSharp.Test.Compiler
5-
open Xunit
5+
6+
/// Various types in the System.Diagnostics.CodeAnalysis namespace will be generated by the compiler
7+
/// for the Framework target but will be included in the runtime for the .NET (Core) target.
8+
/// Since the only IL that is material here is the field names, types, and ordering,
9+
/// and since the spread logic is entirely framework/runtime-agnostic,
10+
/// it is simpler to run these tests only for the .NET (Core) target.
11+
type TheoryAttribute = TheoryForNETCOREAPPAttribute
612

713
let [<Literal>] SupportedLangVersion = "preview"
814

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
type R1 = {| A : int; B : int |}
12
[<NoEquality; NoComparison; DefaultAugmentation(false)>]
2-
type R2 = { ...{| A : int; B : int |}; C : int }
3+
type R2 = { ...R1; C : int }

0 commit comments

Comments
 (0)