diff --git a/docs/compilers/CSharp/readme.md b/docs/compilers/CSharp/readme.md
new file mode 100644
index 0000000000000..2bd717adf176a
--- /dev/null
+++ b/docs/compilers/CSharp/readme.md
@@ -0,0 +1,10 @@
+Breaking changes (newest release on top):
+
+- [.NET 6 and Visual Studio 2022](https://github.com/dotnet/roslyn/blob/main/docs/compilers/CSharp/Compiler%20Breaking%20Changes%20-%20DotNet%206.md)
+- [Minor releases following .NET 5 and Visual Studio 2019 version 16.9](https://github.com/dotnet/roslyn/blob/main/docs/compilers/CSharp/Compiler%20Breaking%20Changes%20-%20post%20DotNet%205.md)
+- [.NET 5 and Visual Studio 2019 version 16.9](https://github.com/dotnet/roslyn/blob/main/docs/compilers/CSharp/Compiler%20Breaking%20Changes%20-%20DotNet%205.md)
+- [Minor releases following Visual Studio 2019 version 16.0](https://github.com/dotnet/roslyn/blob/main/docs/compilers/CSharp/Compiler%20Breaking%20Changes%20-%20post%20VS2019.md)
+- [Visual Studio 2019 version 16.0](https://github.com/dotnet/roslyn/blob/main/docs/compilers/CSharp/Compiler%20Breaking%20Changes%20-%20VS2019.md)
+- [Minor releases following Visual Studio 2017 version 15.0](https://github.com/dotnet/roslyn/blob/main/docs/compilers/CSharp/Compiler%20Breaking%20Changes%20-%20post%20VS2017.md)
+- [Visual Studio 2017 version 15.0](https://github.com/dotnet/roslyn/blob/main/docs/compilers/CSharp/Compiler%20Breaking%20Changes%20-%20VS2017.md)
+- [Visual Studio 2015 version 14.0](https://github.com/dotnet/roslyn/blob/main/docs/compilers/CSharp/Compiler%20Breaking%20Changes%20-%20VS2015.md)
diff --git a/eng/Versions.props b/eng/Versions.props
index 7527c1b1bb5f8..1b0533541cfe2 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -52,6 +52,7 @@
0.9.3
1.2.1
1.2.1
+ 1.2.2
0.13.0
0.13.0
1.4.4
diff --git a/src/Compilers/CSharp/Portable/Symbols/AssemblySymbol.cs b/src/Compilers/CSharp/Portable/Symbols/AssemblySymbol.cs
index b72a47fb05017..1f39620a8b0c2 100644
--- a/src/Compilers/CSharp/Portable/Symbols/AssemblySymbol.cs
+++ b/src/Compilers/CSharp/Portable/Symbols/AssemblySymbol.cs
@@ -436,8 +436,7 @@ internal bool RuntimeSupportsDefaultInterfaceImplementation
///
internal bool RuntimeSupportsStaticAbstractMembersInInterfaces
{
- // https://github.com/dotnet/roslyn/issues/53800: Implement the actual check, this is a temporary stub.
- get => RuntimeSupportsDefaultInterfaceImplementation;
+ get => RuntimeSupportsFeature(SpecialMember.System_Runtime_CompilerServices_RuntimeFeature__VirtualStaticsInInterfaces);
}
private bool RuntimeSupportsFeature(SpecialMember feature)
diff --git a/src/Compilers/CSharp/Test/Emit/Attributes/AttributeTests.cs b/src/Compilers/CSharp/Test/Emit/Attributes/AttributeTests.cs
index 2b9e107c94dc1..344c9ef91c240 100644
--- a/src/Compilers/CSharp/Test/Emit/Attributes/AttributeTests.cs
+++ b/src/Compilers/CSharp/Test/Emit/Attributes/AttributeTests.cs
@@ -10100,7 +10100,7 @@ public static void Main()
}
}
";
- var comp = CreateCompilation(source, targetFramework: TargetFramework.NetCoreApp);
+ var comp = CreateCompilation(source, targetFramework: TargetFramework.Net60);
comp.VerifyEmitDiagnostics();
}
diff --git a/src/Compilers/CSharp/Test/Symbol/Symbols/DefaultInterfaceImplementationTests.cs b/src/Compilers/CSharp/Test/Symbol/Symbols/DefaultInterfaceImplementationTests.cs
index ee681eee7a4cf..744421583f648 100644
--- a/src/Compilers/CSharp/Test/Symbol/Symbols/DefaultInterfaceImplementationTests.cs
+++ b/src/Compilers/CSharp/Test/Symbol/Symbols/DefaultInterfaceImplementationTests.cs
@@ -7003,7 +7003,7 @@ class Test2 : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: TargetFramework.Net60);
compilation1.VerifyDiagnostics(
// (10,24): error CS8703: The modifier 'sealed' is not valid for this item in C# 9.0. Please use language version 'preview' or greater.
@@ -12210,7 +12210,7 @@ class Test2 : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: TargetFramework.Net60);
compilation1.VerifyDiagnostics(
// (4,25): error CS8703: The modifier 'abstract' is not valid for this item in C# 9.0. Please use language version 'preview' or greater.
@@ -25379,7 +25379,7 @@ class Test2 : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: TargetFramework.Net60);
compilation1.VerifyDiagnostics(
// (8,46): error CS0073: An add or remove accessor must have a body
diff --git a/src/Compilers/CSharp/Test/Symbol/Symbols/MissingSpecialMember.cs b/src/Compilers/CSharp/Test/Symbol/Symbols/MissingSpecialMember.cs
index 5a2b786ec2ec3..fa901821053c8 100644
--- a/src/Compilers/CSharp/Test/Symbol/Symbols/MissingSpecialMember.cs
+++ b/src/Compilers/CSharp/Test/Symbol/Symbols/MissingSpecialMember.cs
@@ -542,6 +542,7 @@ public void AllSpecialTypeMembers()
var symbol = comp.GetSpecialTypeMember(special);
if (special == SpecialMember.System_Runtime_CompilerServices_RuntimeFeature__DefaultImplementationsOfInterfaces
|| special == SpecialMember.System_Runtime_CompilerServices_RuntimeFeature__CovariantReturnsOfClasses
+ || special == SpecialMember.System_Runtime_CompilerServices_RuntimeFeature__VirtualStaticsInInterfaces
|| special == SpecialMember.System_Runtime_CompilerServices_RuntimeFeature__UnmanagedSignatureCallingConvention
|| special == SpecialMember.System_Runtime_CompilerServices_PreserveBaseOverridesAttribute__ctor)
{
diff --git a/src/Compilers/CSharp/Test/Symbol/Symbols/StaticAbstractMembersInInterfacesTests.cs b/src/Compilers/CSharp/Test/Symbol/Symbols/StaticAbstractMembersInInterfacesTests.cs
index e0dd8695f7fa4..f96ce8371b9bd 100644
--- a/src/Compilers/CSharp/Test/Symbol/Symbols/StaticAbstractMembersInInterfacesTests.cs
+++ b/src/Compilers/CSharp/Test/Symbol/Symbols/StaticAbstractMembersInInterfacesTests.cs
@@ -25,6 +25,8 @@ namespace Microsoft.CodeAnalysis.CSharp.UnitTests.Symbols
{
public class StaticAbstractMembersInInterfacesTests : CSharpTestBase
{
+ private const TargetFramework _supportingFramework = TargetFramework.Net60;
+
[Fact]
public void MethodModifiers_01()
{
@@ -65,7 +67,7 @@ sealed override static void M10()
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,26): error CS8703: The modifier 'abstract' is not valid for this item in C# 9.0. Please use language version 'preview' or greater.
@@ -303,7 +305,7 @@ sealed override static void M10()
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,26): error CS8703: The modifier 'abstract' is not valid for this item in C# 9.0. Please use language version 'preview' or greater.
@@ -411,7 +413,7 @@ sealed override static void M10()
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (7,25): error CS0112: A static member cannot be marked as 'virtual'
@@ -504,7 +506,7 @@ sealed override static void M10()
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,26): error CS0500: 'I1.M01()' cannot declare a body because it is marked abstract
@@ -591,7 +593,7 @@ sealed override static void M10()
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular7_3,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,26): error CS8703: The modifier 'abstract' is not valid for this item in C# 7.3. Please use language version 'preview' or greater.
@@ -714,7 +716,7 @@ sealed override static void M10()
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular7_3,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,26): error CS8703: The modifier 'abstract' is not valid for this item in C# 7.3. Please use language version 'preview' or greater.
@@ -823,7 +825,7 @@ partial sealed static I3() {}
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,19): error CS0106: The modifier 'sealed' is not valid for this item
@@ -908,7 +910,7 @@ sealed static partial I3() {}
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,19): error CS0246: The type or namespace name 'partial' could not be found (are you missing a using directive or an assembly reference?)
@@ -978,7 +980,7 @@ interface I3
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,21): error CS0106: The modifier 'abstract' is not valid for this item
@@ -1018,7 +1020,7 @@ partial interface I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
@@ -1055,7 +1057,7 @@ sealed static partial void M01() {}
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
ValidatePartialSealedStatic_02(compilation1);
}
@@ -1111,7 +1113,7 @@ sealed static partial void M01() {}
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
ValidatePartialSealedStatic_02(compilation1);
}
@@ -1132,7 +1134,7 @@ static partial void M01() {}
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
ValidatePartialSealedStatic_02(compilation1);
}
@@ -1149,7 +1151,7 @@ partial interface I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,34): error CS0750: A partial method cannot have the 'abstract' modifier
@@ -1190,7 +1192,7 @@ abstract static partial void M01() {}
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,34): error CS0750: A partial method cannot have the 'abstract' modifier
@@ -1251,7 +1253,7 @@ static partial void M01() {}
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,34): error CS0750: A partial method cannot have the 'abstract' modifier
@@ -1306,7 +1308,7 @@ abstract static partial void M01() {}
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (8,34): error CS0500: 'I1.M01()' cannot declare a body because it is marked abstract
@@ -1363,7 +1365,7 @@ interface I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,34): error CS0621: 'I1.M01()': virtual or abstract members cannot be private
@@ -1421,7 +1423,7 @@ sealed override static bool M10 { get
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,26): error CS8703: The modifier 'abstract' is not valid for this item in C# 9.0. Please use language version 'preview' or greater.
@@ -1745,7 +1747,7 @@ sealed override static bool M10 { get
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,26): error CS8703: The modifier 'abstract' is not valid for this item in C# 9.0. Please use language version 'preview' or greater.
@@ -1853,7 +1855,7 @@ sealed override static bool M10 { get
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (7,25): error CS0112: A static member cannot be marked as 'virtual'
@@ -1928,7 +1930,7 @@ sealed override static bool M10 { get
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,32): error CS0500: 'I1.M01.get' cannot declare a body because it is marked abstract
@@ -2015,7 +2017,7 @@ sealed override static bool M10 { get
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular7_3,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,26): error CS8703: The modifier 'abstract' is not valid for this item in C# 7.3. Please use language version 'preview' or greater.
@@ -2120,7 +2122,7 @@ sealed override static bool M10 { get
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular7_3,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,26): error CS8703: The modifier 'abstract' is not valid for this item in C# 7.3. Please use language version 'preview' or greater.
@@ -2239,7 +2241,7 @@ sealed override static event D M10
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,29): error CS8703: The modifier 'abstract' is not valid for this item in C# 9.0. Please use language version 'preview' or greater.
@@ -2571,7 +2573,7 @@ sealed override static event D M10 { add {} remove {} }
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,29): error CS8703: The modifier 'abstract' is not valid for this item in C# 9.0. Please use language version 'preview' or greater.
@@ -2681,7 +2683,7 @@ sealed override static event D M10
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (7,28): error CS0112: A static member cannot be marked as 'virtual'
@@ -2757,7 +2759,7 @@ sealed override static event D M10 { add {} remove {} }
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,33): error CS8712: 'I1.M01': abstract event cannot use event accessor syntax
@@ -2846,7 +2848,7 @@ sealed override static event D M10
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular7_3,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,29): error CS8703: The modifier 'abstract' is not valid for this item in C# 7.3. Please use language version 'preview' or greater.
@@ -2952,7 +2954,7 @@ sealed override static event D M10 { add {} remove {} }
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular7_3,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,29): error CS8703: The modifier 'abstract' is not valid for this item in C# 7.3. Please use language version 'preview' or greater.
@@ -3069,7 +3071,7 @@ public interface I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,32): error CS8703: The modifier 'abstract' is not valid for this item in C# 9.0. Please use language version 'preview' or greater.
@@ -3307,7 +3309,7 @@ public interface I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,32): error CS8703: The modifier 'abstract' is not valid for this item in C# 9.0. Please use language version 'preview' or greater.
@@ -3415,7 +3417,7 @@ public interface I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (7,31): error CS0106: The modifier 'virtual' is not valid for this item
@@ -3508,7 +3510,7 @@ public interface I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,32): error CS0500: 'I1.operator +(I1)' cannot declare a body because it is marked abstract
@@ -3595,7 +3597,7 @@ public interface I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular7_3,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,32): error CS8703: The modifier 'abstract' is not valid for this item in C# 7.3. Please use language version 'preview' or greater.
@@ -3718,7 +3720,7 @@ public interface I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular7_3,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,32): error CS8703: The modifier 'abstract' is not valid for this item in C# 7.3. Please use language version 'preview' or greater.
@@ -3823,7 +3825,7 @@ public interface I3
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular7_3,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,34): error CS8703: The modifier 'abstract' is not valid for this item in C# 7.3. Please use language version 'preview' or greater.
@@ -3868,7 +3870,7 @@ public interface I3
compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,34): error CS8703: The modifier 'abstract' is not valid for this item in C# 9.0. Please use language version 'preview' or greater.
@@ -3913,7 +3915,7 @@ public interface I3
compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (6,34): error CS0500: 'I1.operator !=(I1, I1)' cannot declare a body because it is marked abstract
@@ -4015,7 +4017,7 @@ public interface I3
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular7_3,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,39): error CS8703: The modifier 'abstract' is not valid for this item in C# 7.3. Please use language version 'preview' or greater.
@@ -4078,7 +4080,7 @@ public interface I3
compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,39): error CS8703: The modifier 'abstract' is not valid for this item in C# 9.0. Please use language version 'preview' or greater.
@@ -4141,7 +4143,7 @@ public interface I3
compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,39): error CS0552: 'I1.implicit operator int(I1)': user-defined conversions to or from an interface are not allowed
@@ -4248,7 +4250,7 @@ public interface I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,25): error CS0681: The modifier 'abstract' is not valid on fields. Try using a property instead.
@@ -4287,7 +4289,7 @@ interface I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,33): error CS0180: 'I1.M01()' cannot be both extern and abstract
@@ -4320,7 +4322,7 @@ extern abstract static event System.Action E01 { add {} remove {} }
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,33): error CS0180: 'I1.M01()' cannot be both extern and abstract
@@ -4358,7 +4360,7 @@ interface I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
}
@@ -4378,7 +4380,7 @@ abstract class C1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,33): error CS0112: A static member cannot be marked as 'abstract'
@@ -4414,7 +4416,7 @@ sealed static event System.Action E01 { add {} remove {} }
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,24): error CS0238: 'C1.M01()' cannot be sealed because it is not an override
@@ -4447,7 +4449,7 @@ struct C1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,33): error CS0112: A static member cannot be marked as 'abstract'
@@ -4483,7 +4485,7 @@ sealed static event System.Action E01 { add {} remove {} }
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,24): error CS0238: 'C1.M01()' cannot be sealed because it is not an override
@@ -4513,7 +4515,10 @@ interface I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
+
+ Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation);
+ Assert.True(compilation1.Assembly.RuntimeSupportsStaticAbstractMembersInInterfaces);
CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -4551,6 +4556,22 @@ interface I1
// abstract static void M01();
Diagnostic(ErrorCode.ERR_RuntimeDoesNotSupportStaticAbstractMembersInInterfaces, "M01").WithLocation(4, 26)
);
+
+ Assert.False(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation);
+ Assert.False(compilation1.Assembly.RuntimeSupportsStaticAbstractMembersInInterfaces);
+
+ var compilation2 = CreateCompilation(source1, options: TestOptions.DebugDll,
+ parseOptions: TestOptions.RegularPreview,
+ targetFramework: TargetFramework.Net50);
+
+ compilation2.VerifyDiagnostics(
+ // (4,26): error CS8919: Target runtime doesn't support static abstract members in interfaces.
+ // abstract static void M01();
+ Diagnostic(ErrorCode.ERR_RuntimeDoesNotSupportStaticAbstractMembersInInterfaces, "M01").WithLocation(4, 26)
+ );
+
+ Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation);
+ Assert.False(compilation2.Assembly.RuntimeSupportsStaticAbstractMembersInInterfaces);
}
[Theory]
@@ -4581,7 +4602,7 @@ interface I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -4619,7 +4640,7 @@ interface I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -4743,7 +4764,7 @@ interface I1 where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -4805,7 +4826,7 @@ interface I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -4874,7 +4895,7 @@ interface I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -4948,7 +4969,7 @@ public interface I3 : I2
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var source2 =
@"
@@ -5023,7 +5044,7 @@ void Test(C8 x)
";
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { compilation1.ToMetadataReference() });
var expected = new[] {
@@ -5063,7 +5084,7 @@ void Test(C8 x)
compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { compilation1.EmitToImageReference() });
compilation2.VerifyDiagnostics(expected);
@@ -5091,7 +5112,7 @@ public static void M01() {}
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var source2 =
@"
@@ -5143,14 +5164,14 @@ class C6 : C5
";
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { compilation1.ToMetadataReference() });
compilation2.VerifyEmitDiagnostics();
compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { compilation1.EmitToImageReference() });
compilation2.VerifyEmitDiagnostics();
@@ -5172,7 +5193,7 @@ interface I2
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (5,21): error CS1961: Invalid variance: The type parameter 'T2' must be covariantly valid on 'I2.P2'. 'T2' is contravariant.
// abstract static T2 P2 { get; }
@@ -5199,7 +5220,7 @@ interface I2
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (5,21): error CS1961: Invalid variance: The type parameter 'T2' must be covariantly valid on 'I2.M2()'. 'T2' is contravariant.
// abstract static T2 M2();
@@ -5226,7 +5247,7 @@ interface I2
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (5,58): error CS1961: Invalid variance: The type parameter 'T2' must be covariantly valid on 'I2.E2'. 'T2' is contravariant.
// abstract static event System.Action> E2;
@@ -5255,7 +5276,7 @@ interface I3
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,36): error CS1961: Invalid variance: The type parameter 'T2' must be contravariantly valid on 'I2.operator +(I2)'. 'T2' is covariant.
// abstract static int operator +(I2 x);
@@ -5337,7 +5358,7 @@ interface I13
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_OperatorNeedsMatch).Verify(
// (4,26): error CS0562: The parameter of a unary operator must be the containing type
// static bool operator +(T1 x) => throw null;
@@ -5433,7 +5454,7 @@ interface I13
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,24): error CS0559: The parameter type for ++ or -- operator must be the containing type
// static T1 operator ++(T1 x) => throw null;
@@ -5540,7 +5561,7 @@ interface I15 where T151 : I15 where T152 : I15 x) => throw null;
@@ -5647,7 +5668,7 @@ interface I13
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_InterfacesCantContainConversionOrEqualityOperators)).Verify(
// (4,26): error CS0563: One of the parameters of a binary operator must be the containing type
// static bool operator +(T1 x, bool y) => throw null;
@@ -5742,7 +5763,7 @@ interface I13
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_InterfacesCantContainConversionOrEqualityOperators)).Verify(
// (4,26): error CS0563: One of the parameters of a binary operator must be the containing type
// static bool operator +(bool y, T1 x) => throw null;
@@ -5843,7 +5864,7 @@ interface I14
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_OperatorNeedsMatch).Verify(
// (4,26): error CS0564: The first operand of an overloaded shift operator must have the same type as the containing type, and the type of the second operand must be int
// static bool operator <<(T1 x, int y) => throw null;
@@ -5964,7 +5985,7 @@ interface I19 where T19_1 : I19, T19_2
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,39): error CS0555: User-defined operator cannot convert a type to itself
// abstract static explicit operator T1(T1 y);
@@ -6085,7 +6106,7 @@ interface I19 where T19_1 : I19, T19_2
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (4,39): error CS0555: User-defined operator cannot convert a type to itself
// abstract static explicit operator T1(T1 y);
@@ -6166,7 +6187,7 @@ static void MT2() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (8,9): error CS8926: A static abstract interface member can be accessed only on a type parameter.
@@ -6252,7 +6273,7 @@ static void MT2() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (35,20): error CS0119: 'T' is a type parameter, which is not valid in the given context
@@ -6301,7 +6322,7 @@ static async void M05() where T : U where U : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -6335,7 +6356,7 @@ .locals init (string V_0)
compilation1 = CreateCompilation(source1, options: TestOptions.ReleaseDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -6413,7 +6434,7 @@ static void M02() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
@@ -6458,7 +6479,7 @@ static void M02() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
// https://github.com/dotnet/roslyn/issues/53796: Confirm whether we want to enable the 'from t in T' scenario.
compilation1.VerifyDiagnostics(
@@ -6493,11 +6514,11 @@ static void M02() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { compilation1.ToMetadataReference() });
compilation2.VerifyDiagnostics(
@@ -6508,7 +6529,7 @@ static void M02() where T : I1
var compilation3 = CreateCompilation(source2 + source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation3.VerifyDiagnostics(
// (6,9): error CS8652: The feature 'static abstract members in interfaces' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version.
@@ -6563,7 +6584,7 @@ static void MT2()
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (8,13): error CS8926: A static abstract interface member can be accessed only on a type parameter.
@@ -6619,7 +6640,7 @@ static T M02(T x) where T : U where U : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -6782,7 +6803,7 @@ .locals init (T? V_0,
compilation1 = CreateCompilation(source1, options: TestOptions.ReleaseDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -6980,7 +7001,7 @@ static void M02(T x) where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
@@ -7034,11 +7055,11 @@ static void M02(T x) where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { compilation1.ToMetadataReference() });
compilation2.VerifyDiagnostics(
@@ -7049,7 +7070,7 @@ static void M02(T x) where T : I1
var compilation3 = CreateCompilation(source2 + source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation3.VerifyDiagnostics(
// (12,31): error CS8703: The modifier 'abstract' is not valid for this item in C# 9.0. Please use language version 'preview' or greater.
@@ -7094,7 +7115,7 @@ static void MT2() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (9,13): error CS8926: A static abstract interface member can be accessed only on a type parameter.
@@ -7133,7 +7154,7 @@ static void M02(T x) where T : U where U : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -7154,7 +7175,7 @@ .maxstack 1
compilation1 = CreateCompilation(source1, options: TestOptions.ReleaseDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -7216,7 +7237,7 @@ static void M02(T x) where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
@@ -7266,11 +7287,11 @@ static void M02(T x) where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { compilation1.ToMetadataReference() });
compilation2.VerifyDiagnostics(
@@ -7281,7 +7302,7 @@ static void M02(T x) where T : I1
var compilation3 = CreateCompilation(source2 + source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation3.VerifyDiagnostics(
// (12,35): error CS8703: The modifier 'abstract' is not valid for this item in C# 9.0. Please use language version 'preview' or greater.
@@ -7339,7 +7360,7 @@ class C
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (9,13): error CS8926: A static abstract interface member can be accessed only on a type parameter.
@@ -7388,7 +7409,7 @@ class C
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -7463,7 +7484,7 @@ .locals init (System.ValueTuple> V_0,
compilation1 = CreateCompilation(source1, options: TestOptions.ReleaseDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -7584,7 +7605,7 @@ class C
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
@@ -7644,11 +7665,11 @@ class C
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { compilation1.ToMetadataReference() });
compilation2.VerifyDiagnostics(
@@ -7659,7 +7680,7 @@ class C
var compilation3 = CreateCompilation(source2 + source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation3.VerifyDiagnostics(
// (21,35): error CS8703: The modifier 'abstract' is not valid for this item in C# 9.0. Please use language version 'preview' or greater.
@@ -7721,7 +7742,7 @@ public partial interface I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (8,13): error CS8926: A static abstract interface member can be accessed only on a type parameter.
@@ -7803,7 +7824,7 @@ static void MT4() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreAppAndCSharp);
+ targetFramework: _supportingFramework);
if (success)
{
@@ -8009,7 +8030,7 @@ static void MT2() where T : I2
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (8,9): error CS8926: A static abstract interface member can be accessed only on a type parameter.
@@ -8124,7 +8145,7 @@ static void MT2() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (12,13): error CS8926: A static abstract interface member can be accessed only on a type parameter.
@@ -8208,7 +8229,7 @@ static void M07(T x, I1 y) where T : U where U : I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -8321,7 +8342,7 @@ .locals init (T? V_0)
compilation1 = CreateCompilation(source1, options: TestOptions.ReleaseDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -8495,7 +8516,7 @@ public partial interface I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -8560,7 +8581,7 @@ .maxstack 2
compilation1 = CreateCompilation(source1, options: TestOptions.ReleaseDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -8669,7 +8690,7 @@ public partial interface I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -8743,7 +8764,7 @@ .locals init (T? V_0,
compilation1 = CreateCompilation(source1, options: TestOptions.ReleaseDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -8884,7 +8905,7 @@ static void M04(T? x, T? y) where T : struct, U where U : I2
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreAppAndCSharp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
verifier.VerifyIL("Test.M03(T, T)",
@@ -8949,7 +8970,7 @@ .locals init (T? V_0,
compilation1 = CreateCompilation(source1, options: TestOptions.ReleaseDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreAppAndCSharp);
+ targetFramework: _supportingFramework);
verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
verifier.VerifyIL("Test.M03(T, T)",
@@ -9052,7 +9073,7 @@ static void M04(T? x, T? y) where T : struct, U where U : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreAppAndCSharp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -9163,7 +9184,7 @@ .locals init (I1 V_0)
compilation1 = CreateCompilation(source1, options: TestOptions.ReleaseDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreAppAndCSharp);
+ targetFramework: _supportingFramework);
verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -9365,7 +9386,7 @@ static void M05(T? y) where T : struct, U where U : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -9495,7 +9516,7 @@ .locals init (T? V_0,
compilation1 = CreateCompilation(source1, options: TestOptions.ReleaseDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -9659,7 +9680,7 @@ static void M02((int, T) x) where T : U where U : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -9730,7 +9751,7 @@ .locals init (System.ValueTuple V_0,
compilation1 = CreateCompilation(source1, options: TestOptions.ReleaseDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -9837,7 +9858,7 @@ static void M02(T x, int y) where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
@@ -9893,7 +9914,7 @@ static void M02(T x, T y) where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreAppAndCSharp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
@@ -9981,7 +10002,7 @@ static void M02(T x, int y) where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
@@ -10029,7 +10050,7 @@ static void M02((int, T) x) where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
@@ -10079,11 +10100,11 @@ static void M02(T x, int y) where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { compilation1.ToMetadataReference() });
compilation2.VerifyDiagnostics(
@@ -10094,7 +10115,7 @@ static void M02(T x, int y) where T : I1
var compilation3 = CreateCompilation(source2 + source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation3.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_OperatorNeedsMatch).Verify(
// (12,32): error CS8703: The modifier 'abstract' is not valid for this item in C# 9.0. Please use language version 'preview' or greater.
@@ -10135,11 +10156,11 @@ static void M02(T x, T y) where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreAppAndCSharp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { compilation1.ToMetadataReference() });
if (success)
@@ -10157,7 +10178,7 @@ static void M02(T x, T y) where T : I1
var compilation3 = CreateCompilation(source2 + source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var builder = ArrayBuilder.GetInstance();
@@ -10223,11 +10244,11 @@ static void M02(T x, int y) where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { compilation1.ToMetadataReference() });
compilation2.VerifyDiagnostics(
@@ -10238,7 +10259,7 @@ static void M02(T x, int y) where T : I1
var compilation3 = CreateCompilation(source2 + source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation3.VerifyDiagnostics(
// (12,31): error CS8703: The modifier 'abstract' is not valid for this item in C# 9.0. Please use language version 'preview' or greater.
@@ -10271,11 +10292,11 @@ static void M02((int, T) x) where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { compilation1.ToMetadataReference() });
compilation2.VerifyDiagnostics(
@@ -10286,7 +10307,7 @@ static void M02((int, T) x) where T : I1
var compilation3 = CreateCompilation(source2 + source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation3.VerifyDiagnostics(
// (12,35): error CS8703: The modifier 'abstract' is not valid for this item in C# 9.0. Please use language version 'preview' or greater.
@@ -10347,7 +10368,7 @@ static void MT2() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (8,13): error CS8926: A static abstract interface member can be accessed only on a type parameter.
@@ -10435,7 +10456,7 @@ static void MT2() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (8,9): error CS8926: A static abstract interface member can be accessed only on a type parameter.
@@ -10526,7 +10547,7 @@ static void MT2() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (8,9): error CS8926: A static abstract interface member can be accessed only on a type parameter.
@@ -10621,7 +10642,7 @@ static void MT2() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (14,20): error CS0176: Member 'I1.P01' cannot be accessed with an instance reference; qualify it with a type name instead
@@ -10671,7 +10692,7 @@ static void M02() where T : U where U : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -10690,7 +10711,7 @@ .maxstack 1
compilation1 = CreateCompilation(source1, options: TestOptions.ReleaseDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -10756,7 +10777,7 @@ static void M02() where T : U where U : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -10776,7 +10797,7 @@ .maxstack 1
compilation1 = CreateCompilation(source1, options: TestOptions.ReleaseDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -10847,7 +10868,7 @@ static string M03() where T : U where U : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -10885,7 +10906,7 @@ .locals init (string V_0)
compilation1 = CreateCompilation(source1, options: TestOptions.ReleaseDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -10966,7 +10987,7 @@ static void M02() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
@@ -11015,7 +11036,7 @@ static void M02() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
@@ -11064,7 +11085,7 @@ static void M02() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
@@ -11116,11 +11137,11 @@ static void M02() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { compilation1.ToMetadataReference() });
compilation2.VerifyDiagnostics(
@@ -11131,7 +11152,7 @@ static void M02() where T : I1
var compilation3 = CreateCompilation(source2 + source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation3.VerifyDiagnostics(
// (6,13): error CS8652: The feature 'static abstract members in interfaces' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version.
@@ -11165,11 +11186,11 @@ static void M02() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { compilation1.ToMetadataReference() });
compilation2.VerifyDiagnostics(
@@ -11180,7 +11201,7 @@ static void M02() where T : I1
var compilation3 = CreateCompilation(source2 + source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation3.VerifyDiagnostics(
// (6,9): error CS8652: The feature 'static abstract members in interfaces' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version.
@@ -11214,11 +11235,11 @@ static void M02() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { compilation1.ToMetadataReference() });
compilation2.VerifyDiagnostics(
@@ -11229,7 +11250,7 @@ static void M02() where T : I1
var compilation3 = CreateCompilation(source2 + source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation3.VerifyDiagnostics(
// (6,9): error CS8652: The feature 'static abstract members in interfaces' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version.
@@ -11290,7 +11311,7 @@ static void MT2() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (8,9): error CS8926: A static abstract interface member can be accessed only on a type parameter.
@@ -11384,7 +11405,7 @@ static void MT2() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (8,9): error CS8926: A static abstract interface member can be accessed only on a type parameter.
@@ -11476,7 +11497,7 @@ static void MT2() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (14,20): error CS0176: Member 'I1.P01' cannot be accessed with an instance reference; qualify it with a type name instead
@@ -11532,7 +11553,7 @@ static string M03() where T : U where U : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -11571,7 +11592,7 @@ .locals init (string V_0)
compilation1 = CreateCompilation(source1, options: TestOptions.ReleaseDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -11652,7 +11673,7 @@ static void M02() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
@@ -11698,7 +11719,7 @@ static void M02() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
@@ -11744,11 +11765,11 @@ static void M02() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { compilation1.ToMetadataReference() });
compilation2.VerifyDiagnostics(
@@ -11759,7 +11780,7 @@ static void M02() where T : I1
var compilation3 = CreateCompilation(source2 + source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation3.VerifyDiagnostics(
// (6,9): error CS8652: The feature 'static abstract members in interfaces' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version.
@@ -11793,11 +11814,11 @@ static void M02() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { compilation1.ToMetadataReference() });
compilation2.VerifyDiagnostics(
@@ -11808,7 +11829,7 @@ static void M02() where T : I1
var compilation3 = CreateCompilation(source2 + source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation3.VerifyDiagnostics(
// (6,9): error CS8652: The feature 'static abstract members in interfaces' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version.
@@ -11875,7 +11896,7 @@ static string M03() where T : I1
";
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (6,9): error CS0119: 'T' is a type parameter, which is not valid in the given context
@@ -11903,7 +11924,7 @@ static void M03() where T : I1
";
var compilation2 = CreateCompilationWithIL(source2, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation2.VerifyDiagnostics(
// (6,9): error CS0119: 'T' is a type, which is not valid in the given context
@@ -11969,7 +11990,7 @@ static string M03() where T : I1
";
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (6,11): error CS1545: Property, indexer, or event 'I1.Item[int]' is not supported by the language; try directly calling accessor methods 'I1.get_Item(int)' or 'I1.set_Item(int, int)'
@@ -11992,7 +12013,7 @@ static void M02() where T : I1
";
var compilation2 = CreateCompilationWithIL(source2, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation2, verify: Verification.Skipped).VerifyDiagnostics();
@@ -12065,7 +12086,7 @@ static void MT2() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (8,13): error CS8926: A static abstract interface member can be accessed only on a type parameter.
@@ -12124,7 +12145,7 @@ static System.Action M02() where T : U where U : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -12148,7 +12169,7 @@ .locals init (System.Action V_0)
compilation1 = CreateCompilation(source1, options: TestOptions.ReleaseDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -12203,7 +12224,7 @@ static void M02() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
@@ -12249,11 +12270,11 @@ static void M02() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { compilation1.ToMetadataReference() });
compilation2.VerifyDiagnostics(
@@ -12264,7 +12285,7 @@ static void M02() where T : I1
var compilation3 = CreateCompilation(source2 + source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation3.VerifyDiagnostics(
// (6,28): error CS8652: The feature 'static abstract members in interfaces' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version.
@@ -12325,7 +12346,7 @@ static void MT2() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (8,31): error CS8926: A static abstract interface member can be accessed only on a type parameter.
@@ -12384,7 +12405,7 @@ static System.Action M02() where T : U where U : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -12408,7 +12429,7 @@ .locals init (System.Action V_0)
compilation1 = CreateCompilation(source1, options: TestOptions.ReleaseDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -12463,7 +12484,7 @@ static void M02() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
@@ -12509,11 +12530,11 @@ static void M02() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { compilation1.ToMetadataReference() });
compilation2.VerifyDiagnostics(
@@ -12524,7 +12545,7 @@ static void M02() where T : I1
var compilation3 = CreateCompilation(source2 + source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation3.VerifyDiagnostics(
// (6,31): error CS8652: The feature 'static abstract members in interfaces' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version.
@@ -12585,7 +12606,7 @@ static void MT2() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll.WithAllowUnsafe(true),
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (8,13): error CS8926: A static abstract interface member can be accessed only on a type parameter.
@@ -12647,7 +12668,7 @@ unsafe class Test
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll.WithAllowUnsafe(true),
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -12669,7 +12690,7 @@ .locals init (delegate* V_0)
compilation1 = CreateCompilation(source1, options: TestOptions.ReleaseDll.WithAllowUnsafe(true),
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
@@ -12722,7 +12743,7 @@ static void M02() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll.WithAllowUnsafe(true),
parseOptions: TestOptions.RegularPreview,
@@ -12768,11 +12789,11 @@ static void M02() where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll.WithAllowUnsafe(true),
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { compilation1.ToMetadataReference() });
compilation2.VerifyDiagnostics(
@@ -12783,7 +12804,7 @@ static void M02() where T : I1
var compilation3 = CreateCompilation(source2 + source1, options: TestOptions.DebugDll.WithAllowUnsafe(true),
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation3.VerifyDiagnostics(
// (6,31): error CS8652: The feature 'static abstract members in interfaces' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version.
@@ -12845,7 +12866,7 @@ void I1.M01() {}
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (8,10): error CS0535: 'C1' does not implement interface member 'I1.M01()'
@@ -12925,7 +12946,7 @@ static void I1.M01() {}
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (8,10): error CS0535: 'C1' does not implement interface member 'I1.M01()'
@@ -13001,7 +13022,7 @@ interface I8 : I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (12,25): warning CS0108: 'I3.M01()' hides inherited member 'I1.M01()'. Use the new keyword if hiding was intended.
@@ -13065,11 +13086,11 @@ public static void M02() {}
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { compilation1.ToMetadataReference() });
compilation2.VerifyDiagnostics(
@@ -13080,7 +13101,7 @@ public static void M02() {}
var compilation3 = CreateCompilation(source2 + source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation3.VerifyDiagnostics(
// (4,20): error CS8703: The modifier 'static' is not valid for this item in C# 9.0. Please use language version 'preview' or greater.
@@ -13117,7 +13138,7 @@ public static void M01() {}
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
@@ -13166,7 +13187,7 @@ static void I1.M01() {}
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
@@ -13217,7 +13238,7 @@ public static void M01() {}
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -13278,7 +13299,7 @@ static void I1.M01() {}
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -13332,7 +13353,7 @@ static void I1.M01() {}
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
@@ -13349,7 +13370,7 @@ public class C3 : C2, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
}
@@ -13447,7 +13468,7 @@ public class C5 : C2, I1
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
@@ -13474,7 +13495,7 @@ public class C5 : C2, I1
compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
}
@@ -13504,7 +13525,7 @@ public class C1 : I1
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyEmitDiagnostics();
@@ -13517,7 +13538,7 @@ public class C1 : I1
compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyEmitDiagnostics();
@@ -13531,7 +13552,7 @@ static void I1.M01() {}
var compilation2 = CreateCompilationWithIL(source2, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation2.VerifyEmitDiagnostics(
// (4,19): error CS0539: 'C1.M01()' in explicit interface declaration is not found among members of the interface that can be implemented
@@ -13580,7 +13601,7 @@ public class C1 : I2
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyEmitDiagnostics(
// (2,19): error CS0535: 'C1' does not implement interface member 'I1.M01()'
@@ -13624,7 +13645,7 @@ class C2 : C1, I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -13708,7 +13729,7 @@ static void I1.M01() {}
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -13807,7 +13828,7 @@ static void I1.M02() {}
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
@@ -13824,7 +13845,7 @@ public class C3 : C2, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
}
@@ -13893,7 +13914,7 @@ public class C2 : C1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
@@ -13910,7 +13931,7 @@ public class C3 : C2, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
var verifier = CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -13985,8 +14006,8 @@ public class C1 : I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp,
- references: new[] { CreateCompilation("", targetFramework: TargetFramework.NetCoreApp).ToMetadataReference() });
+ targetFramework: _supportingFramework,
+ references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() });
Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().Where(m => m.Name.Contains("M01")).Count());
compilation1.VerifyDiagnostics();
@@ -14004,7 +14025,7 @@ public class C2 : C1, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -14068,8 +14089,8 @@ public class C1 : I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp,
- references: new[] { CreateCompilation("", targetFramework: TargetFramework.NetCoreApp).ToMetadataReference() });
+ targetFramework: _supportingFramework,
+ references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() });
Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().Where(m => m.Name.Contains("M01")).Count());
compilation1.VerifyDiagnostics();
@@ -14087,7 +14108,7 @@ public class C2 : C1, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -14149,8 +14170,8 @@ public class C1 : I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp,
- references: new[] { CreateCompilation("", targetFramework: TargetFramework.NetCoreApp).ToMetadataReference() });
+ targetFramework: _supportingFramework,
+ references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() });
Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().Where(m => m.Name.Contains("M01")).Count());
compilation1.VerifyDiagnostics();
@@ -14168,7 +14189,7 @@ public class C2 : C1, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -14218,8 +14239,8 @@ public class C1 : I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp,
- references: new[] { CreateCompilation("", targetFramework: TargetFramework.NetCoreApp).ToMetadataReference() });
+ targetFramework: _supportingFramework,
+ references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() });
Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().Where(m => m.Name.Contains("M01")).Count());
@@ -14238,7 +14259,7 @@ public class C2 : C1, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -14292,8 +14313,8 @@ public class C11 : C1, I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp,
- references: new[] { CreateCompilation("", targetFramework: TargetFramework.NetCoreApp).ToMetadataReference() });
+ targetFramework: _supportingFramework,
+ references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() });
Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().Where(m => m.Name.Contains("M01")).Count());
compilation1.VerifyDiagnostics();
@@ -14311,7 +14332,7 @@ public class C2 : C11, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -14378,8 +14399,8 @@ public class C11 : C1, I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp,
- references: new[] { CreateCompilation("", targetFramework: TargetFramework.NetCoreApp).ToMetadataReference() });
+ targetFramework: _supportingFramework,
+ references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() });
Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().Where(m => m.Name.Contains("M01")).Count());
compilation1.VerifyDiagnostics();
@@ -14397,7 +14418,7 @@ public class C2 : C11, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -14515,7 +14536,7 @@ public interface I2 where T : I2
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadIncDecRetType or (int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_OpTFRetType)).Verify(
// (8,10): error CS0535: 'C1' does not implement interface member 'I1.operator +(C1)'
@@ -14653,7 +14674,7 @@ public interface I2 where T : I2
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).Verify(
// (8,10): error CS0535: 'C1' does not implement interface member 'I1.operator >>(C1, int)'
@@ -14787,7 +14808,7 @@ interface I14 : I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
ErrorCode badSignatureError = op.Length != 2 ? ErrorCode.ERR_BadUnaryOperatorSignature : ErrorCode.ERR_BadIncDecSignature;
ErrorCode badAbstractSignatureError = op.Length != 2 ? ErrorCode.ERR_BadAbstractUnaryOperatorSignature : ErrorCode.ERR_BadAbstractIncDecSignature;
@@ -14950,7 +14971,7 @@ interface I14 : I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
bool isShift = op == "<<" || op == ">>";
ErrorCode badSignatureError = isShift ? ErrorCode.ERR_BadShiftOperatorSignature : ErrorCode.ERR_BadBinaryOperatorSignature;
@@ -15098,11 +15119,11 @@ public interface I2 where T : I2
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { compilation1.ToMetadataReference() });
compilation2.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_OpTFRetType)).Verify(
@@ -15113,7 +15134,7 @@ public interface I2 where T : I2
var compilation3 = CreateCompilation(source2 + source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_OpTFRetType)).Verify(
// (4,15): error CS8652: The feature 'static abstract members in interfaces' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version.
@@ -15160,11 +15181,11 @@ public interface I2 where T : I2
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { compilation1.ToMetadataReference() });
compilation2.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).Verify(
@@ -15175,7 +15196,7 @@ public interface I2 where T : I2
var compilation3 = CreateCompilation(source2 + source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).Verify(
// (4,15): error CS8652: The feature 'static abstract members in interfaces' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version.
@@ -15212,7 +15233,7 @@ public interface I1 where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
@@ -15261,7 +15282,7 @@ public interface I1 where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
@@ -15310,7 +15331,7 @@ public interface I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
@@ -15359,7 +15380,7 @@ public interface I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
@@ -15411,7 +15432,7 @@ public interface I1 where T : I1
var opName = UnaryOperatorName(op);
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -15491,7 +15512,7 @@ public partial interface I1 where T : I1
var opName = UnaryOperatorName(op);
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -15576,7 +15597,7 @@ public partial interface I1 where T : I1
var opName = BinaryOperatorName(op);
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -15641,7 +15662,7 @@ public interface I1
var opName = UnaryOperatorName(op);
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var tree = compilation1.SyntaxTrees.Single();
var model = compilation1.GetSemanticModel(tree);
@@ -15723,7 +15744,7 @@ public partial interface I1
var opName = UnaryOperatorName(op);
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var tree = compilation1.SyntaxTrees.Single();
var model = compilation1.GetSemanticModel(tree);
@@ -15808,7 +15829,7 @@ public partial interface I1
var opName = BinaryOperatorName(op);
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var tree = compilation1.SyntaxTrees.Single();
@@ -15872,7 +15893,7 @@ public class C2 : I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
@@ -15891,7 +15912,7 @@ public class C3 : C2, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
}
@@ -15945,7 +15966,7 @@ public partial class C2
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
@@ -15964,7 +15985,7 @@ public class C3 : C2, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
}
@@ -16021,7 +16042,7 @@ public partial class C2
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
@@ -16040,7 +16061,7 @@ public class C3 : C2, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
}
@@ -16145,7 +16166,7 @@ public class C5 : C2, I1
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
@@ -16178,7 +16199,7 @@ public class C5 : C2, I1
compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
}
@@ -16270,7 +16291,7 @@ public class C5 : C2, I1
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
@@ -16303,7 +16324,7 @@ public class C5 : C2, I1
compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
}
@@ -16339,7 +16360,7 @@ public class C1 : I1
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyEmitDiagnostics();
@@ -16353,7 +16374,7 @@ public class C1 : I1
compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyEmitDiagnostics();
@@ -16367,7 +16388,7 @@ public class C1 : I1
var compilation2 = CreateCompilationWithIL(source2, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation2.VerifyEmitDiagnostics(
// (4,27): error CS0539: 'C1.operator ~(I1)' in explicit interface declaration is not found among members of the interface that can be implemented
@@ -16414,7 +16435,7 @@ public class C1 : I1
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyEmitDiagnostics();
@@ -16428,7 +16449,7 @@ public class C1 : I1
compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyEmitDiagnostics();
@@ -16442,7 +16463,7 @@ public class C1 : I1
var compilation2 = CreateCompilationWithIL(source2, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation2.VerifyEmitDiagnostics(
// (4,27): error CS0539: 'C1.operator <(I1, int)' in explicit interface declaration is not found among members of the interface that can be implemented
@@ -16498,7 +16519,7 @@ public class C1 : I2
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyEmitDiagnostics(
// (2,19): error CS0535: 'C1' does not implement interface member 'I1.operator ~(I1)'
@@ -16561,7 +16582,7 @@ public class C1 : I2
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyEmitDiagnostics(
// (2,19): error CS0535: 'C1' does not implement interface member 'I1.operator /(I1, int)'
@@ -16627,7 +16648,7 @@ public partial class C1
var opName = BinaryOperatorName(op);
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -16728,7 +16749,7 @@ class C2 : I1
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -16839,7 +16860,7 @@ class C2 : I1
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -16968,7 +16989,7 @@ class C2 : I1
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -17063,7 +17084,7 @@ public partial class C2 : I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
@@ -17082,7 +17103,7 @@ public class C3 : C2, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
}
@@ -17123,7 +17144,7 @@ public partial class C2 : I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
@@ -17141,7 +17162,7 @@ public class C3 : C2, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
}
@@ -17218,7 +17239,7 @@ public partial class C2
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
@@ -17237,7 +17258,7 @@ public class C3 : C2, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
}
@@ -17331,7 +17352,7 @@ public partial class C2 : C1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
@@ -17350,7 +17371,7 @@ public class C3 : C2, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
var verifier = CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -17450,8 +17471,8 @@ public partial class C1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp,
- references: new[] { CreateCompilation("", targetFramework: TargetFramework.NetCoreApp).ToMetadataReference() });
+ targetFramework: _supportingFramework,
+ references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() });
compilation1.VerifyDiagnostics();
Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().Where(m => m.Name.Contains(opName)).Count());
@@ -17469,7 +17490,7 @@ public class C2 : C1, I1, int>
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -17553,8 +17574,8 @@ public partial class C1 : I1, U>
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp,
- references: new[] { CreateCompilation("", targetFramework: TargetFramework.NetCoreApp).ToMetadataReference() });
+ targetFramework: _supportingFramework,
+ references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() });
compilation1.VerifyDiagnostics();
Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().Where(m => m.Name.Contains(opName)).Count());
@@ -17572,7 +17593,7 @@ public class C2 : C1, I1, int>
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -17649,8 +17670,8 @@ public partial class C1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp,
- references: new[] { CreateCompilation("", targetFramework: TargetFramework.NetCoreApp).ToMetadataReference() });
+ targetFramework: _supportingFramework,
+ references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() });
compilation1.VerifyDiagnostics();
Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().Where(m => m.Name.Contains(opName)).Count());
@@ -17668,7 +17689,7 @@ public class C2 : C11, I1, C1>
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -17806,7 +17827,7 @@ public interface I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll.WithAllowUnsafe(true),
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var c1 = compilation1.GlobalNamespace.GetTypeMember("C1");
@@ -17956,7 +17977,7 @@ public interface I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll.WithAllowUnsafe(true),
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var c1 = compilation1.GlobalNamespace.GetTypeMember("C1");
@@ -18026,7 +18047,7 @@ class C2 : I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OpTFRetType or (int)ErrorCode.ERR_OperatorNeedsMatch)).Verify(
// (9,20): error CS0540: 'C1.I1.operator -(I1)': containing type does not implement interface 'I1'
@@ -18071,7 +18092,7 @@ struct C2 : I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_OperatorNeedsMatch).Verify(
// (9,23): error CS0540: 'C1.I1.operator %(I1, int)': containing type does not implement interface 'I1'
@@ -18142,7 +18163,7 @@ public interface I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (8,10): error CS0535: 'C1' does not implement interface member 'I1.M01'
@@ -18222,7 +18243,7 @@ public interface I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (8,10): error CS0535: 'C1' does not implement interface member 'I1.M01'
@@ -18298,7 +18319,7 @@ interface I8 : I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (12,24): warning CS0108: 'I3.M01' hides inherited member 'I1.M01'. Use the new keyword if hiding was intended.
@@ -18363,11 +18384,11 @@ public interface I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { compilation1.ToMetadataReference() });
compilation2.VerifyDiagnostics(
@@ -18378,7 +18399,7 @@ public interface I1
var compilation3 = CreateCompilation(source2 + source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation3.VerifyDiagnostics(
// (4,19): error CS8703: The modifier 'static' is not valid for this item in C# 9.0. Please use language version 'preview' or greater.
@@ -18415,7 +18436,7 @@ public interface I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
@@ -18479,7 +18500,7 @@ public interface I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
@@ -18533,7 +18554,7 @@ public interface I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -18627,7 +18648,7 @@ public interface I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -18717,7 +18738,7 @@ public interface I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -18803,7 +18824,7 @@ public class C2 : C1, I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
@@ -18820,7 +18841,7 @@ public class C3 : C2, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
}
@@ -18982,7 +19003,7 @@ public class C5 : C2, I1
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
@@ -19023,7 +19044,7 @@ public class C5 : C2, I1
compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
}
@@ -19073,7 +19094,7 @@ public class C1 : I1
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyEmitDiagnostics();
@@ -19090,7 +19111,7 @@ public class C1 : I1
compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyEmitDiagnostics();
@@ -19104,7 +19125,7 @@ public class C1 : I1
var compilation2 = CreateCompilationWithIL(source2, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation2.VerifyEmitDiagnostics(
// (4,18): error CS0539: 'C1.M01' in explicit interface declaration is not found among members of the interface that can be implemented
@@ -19132,7 +19153,7 @@ public class C1 : I1
var compilation3 = CreateCompilationWithIL(source3, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
CompileAndVerify(compilation3, sourceSymbolValidator: validate3, symbolValidator: validate3, verify: Verification.Skipped).VerifyDiagnostics();
@@ -19184,7 +19205,7 @@ public class C1 : I1
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (2,19): error CS0535: 'C1' does not implement interface member 'I1.M01'
@@ -19213,7 +19234,7 @@ public class C1 : I1
var compilation2 = CreateCompilationWithIL(source2, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
CompileAndVerify(compilation2, sourceSymbolValidator: validate2, symbolValidator: validate2, verify: Verification.Skipped).VerifyDiagnostics();
@@ -19265,7 +19286,7 @@ public class C1 : I1
var compilation3 = CreateCompilationWithIL(source3, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
CompileAndVerify(compilation3, sourceSymbolValidator: validate3, symbolValidator: validate3, verify: Verification.Skipped).VerifyDiagnostics();
@@ -19338,7 +19359,7 @@ public class C1 : I1
var compilation4 = CreateCompilationWithIL(source4, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation4.VerifyDiagnostics(
// (4,29): error CS0550: 'C1.I1.M01.set' adds an accessor not found in interface member 'I1.M01'
@@ -19368,7 +19389,7 @@ public class C1 : I1
var compilation5 = CreateCompilationWithIL(source5, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
CompileAndVerify(compilation5, sourceSymbolValidator: validate5, symbolValidator: validate5, verify: Verification.Skipped).VerifyDiagnostics();
@@ -19427,7 +19448,7 @@ public static int M01 { set{} }
var compilation6 = CreateCompilationWithIL(source6, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation6.VerifyDiagnostics(
// (2,19): error CS0535: 'C1' does not implement interface member 'I1.M01.get'
@@ -19454,7 +19475,7 @@ static int I1.M01 { set{} }
var compilation7 = CreateCompilationWithIL(source7, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation7.VerifyDiagnostics(
// (2,19): error CS0535: 'C1' does not implement interface member 'I1.M01.get'
@@ -19516,7 +19537,7 @@ public class C1 : I1
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (2,19): error CS0535: 'C1' does not implement interface member 'I1.M01'
@@ -19545,7 +19566,7 @@ static int I1.M01 { set{} }
var compilation2 = CreateCompilationWithIL(source2, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
CompileAndVerify(compilation2, sourceSymbolValidator: validate2, symbolValidator: validate2, verify: Verification.Skipped).VerifyDiagnostics();
@@ -19597,7 +19618,7 @@ public class C1 : I1
var compilation3 = CreateCompilationWithIL(source3, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
CompileAndVerify(compilation3, sourceSymbolValidator: validate3, symbolValidator: validate3, verify: Verification.Skipped).VerifyDiagnostics();
@@ -19670,7 +19691,7 @@ public class C1 : I1
var compilation4 = CreateCompilationWithIL(source4, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation4.VerifyDiagnostics(
// (4,24): error CS0550: 'C1.I1.M01.get' adds an accessor not found in interface member 'I1.M01'
@@ -19700,7 +19721,7 @@ public static int M01 { set{} }
var compilation5 = CreateCompilationWithIL(source5, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
CompileAndVerify(compilation5, sourceSymbolValidator: validate5, symbolValidator: validate5, verify: Verification.Skipped).VerifyDiagnostics();
@@ -19759,7 +19780,7 @@ public class C1 : I1
var compilation6 = CreateCompilationWithIL(source6, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation6.VerifyDiagnostics(
// (2,19): error CS0535: 'C1' does not implement interface member 'I1.M01.set'
@@ -19786,7 +19807,7 @@ public class C1 : I1
var compilation7 = CreateCompilationWithIL(source7, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation7.VerifyDiagnostics(
// (2,19): error CS0535: 'C1' does not implement interface member 'I1.M01.set'
@@ -19877,7 +19898,7 @@ public class C1 : I2
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyEmitDiagnostics(
// (2,19): error CS0535: 'C1' does not implement interface member 'I1.M01'
@@ -19927,7 +19948,7 @@ class C2 : C1, I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -20116,7 +20137,7 @@ class C3 : I2
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -20296,7 +20317,7 @@ public class C2 : C1, I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
@@ -20313,7 +20334,7 @@ public class C3 : C2, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
}
@@ -20409,7 +20430,7 @@ public class C2 : C1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
@@ -20426,7 +20447,7 @@ public class C3 : C2, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
var verifier = CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -20536,8 +20557,8 @@ public class C1 : I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp,
- references: new[] { CreateCompilation("", targetFramework: TargetFramework.NetCoreApp).ToMetadataReference() });
+ targetFramework: _supportingFramework,
+ references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() });
Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().OfType().Where(m => m.Name.Contains("M01")).Count());
compilation1.VerifyDiagnostics();
@@ -20555,7 +20576,7 @@ public class C2 : C1, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -20605,8 +20626,8 @@ public class C1 : I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp,
- references: new[] { CreateCompilation("", targetFramework: TargetFramework.NetCoreApp).ToMetadataReference() });
+ targetFramework: _supportingFramework,
+ references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() });
Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().OfType().Where(m => m.Name.Contains("M01")).Count());
@@ -20625,7 +20646,7 @@ public class C2 : C1, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -20696,7 +20717,7 @@ static event System.Action I1.M01 { add{} remove{}}
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (8,10): error CS0535: 'C1' does not implement interface member 'I1.M01'
@@ -20776,7 +20797,7 @@ event System.Action I1.M01 { add{} remove{} }
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (8,10): error CS0535: 'C1' does not implement interface member 'I1.M01'
@@ -20852,7 +20873,7 @@ interface I8 : I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (12,40): warning CS0108: 'I3.M01' hides inherited member 'I1.M01'. Use the new keyword if hiding was intended.
@@ -20917,11 +20938,11 @@ public interface I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { compilation1.ToMetadataReference() });
compilation2.VerifyDiagnostics(
@@ -20935,7 +20956,7 @@ public interface I1
var compilation3 = CreateCompilation(source2 + source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation3.VerifyDiagnostics(
// (4,35): error CS8703: The modifier 'static' is not valid for this item in C# 9.0. Please use language version 'preview' or greater.
@@ -20975,7 +20996,7 @@ public static event System.Action M01 { add{} remove{} }
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
@@ -21036,7 +21057,7 @@ public interface I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
@@ -21087,7 +21108,7 @@ public interface I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -21181,7 +21202,7 @@ public interface I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -21267,7 +21288,7 @@ public class C2 : C1, I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
@@ -21284,7 +21305,7 @@ public class C3 : C2, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
}
@@ -21451,7 +21472,7 @@ public class C5 : C2, I1
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
@@ -21492,7 +21513,7 @@ public class C5 : C2, I1
compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
}
@@ -21543,7 +21564,7 @@ public class C1 : I1
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyEmitDiagnostics();
@@ -21560,7 +21581,7 @@ public class C1 : I1
compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyEmitDiagnostics();
@@ -21574,7 +21595,7 @@ static event System.Action I1.M01 { add{} remove{} }
var compilation2 = CreateCompilationWithIL(source2, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation2.VerifyEmitDiagnostics(
// (4,34): error CS0539: 'C1.M01' in explicit interface declaration is not found among members of the interface that can be implemented
@@ -21602,7 +21623,7 @@ public static event System.Action M01 { add{} remove{} }
var compilation3 = CreateCompilationWithIL(source3, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
CompileAndVerify(compilation3, sourceSymbolValidator: validate3, symbolValidator: validate3, verify: Verification.Skipped).VerifyDiagnostics();
@@ -21656,7 +21677,7 @@ public class C1 : I1
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (2,19): error CS0535: 'C1' does not implement interface member 'I1.M01'
@@ -21685,7 +21706,7 @@ static event System.Action I1.M01 { add {} }
var compilation2 = CreateCompilationWithIL(source2, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation2.VerifyDiagnostics(
// (4,34): error CS0065: 'C1.I1.M01': event property must have both add and remove accessors
@@ -21714,7 +21735,7 @@ public static event System.Action M01 { add{} remove{} }
var compilation3 = CreateCompilationWithIL(source3, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
CompileAndVerify(compilation3, sourceSymbolValidator: validate3, symbolValidator: validate3, verify: Verification.Skipped).VerifyDiagnostics();
@@ -21786,7 +21807,7 @@ static event System.Action I1.M01 { add{} remove{} }
var compilation4 = CreateCompilationWithIL(source4, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation4.VerifyDiagnostics(
// (4,46): error CS0550: 'C1.I1.M01.remove' adds an accessor not found in interface member 'I1.M01'
@@ -21816,7 +21837,7 @@ public static event System.Action M01 { add{} }
var compilation5 = CreateCompilationWithIL(source5, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation5.VerifyDiagnostics(
// (4,38): error CS0065: 'C1.M01': event property must have both add and remove accessors
@@ -21843,7 +21864,7 @@ public static event System.Action M01 { remove{} }
var compilation6 = CreateCompilationWithIL(source6, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation6.VerifyDiagnostics(
// (2,19): error CS0535: 'C1' does not implement interface member 'I1.M01.add'
@@ -21873,7 +21894,7 @@ static event System.Action I1.M01 { remove{} }
var compilation7 = CreateCompilationWithIL(source7, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation7.VerifyDiagnostics(
// (2,19): error CS0535: 'C1' does not implement interface member 'I1.M01.add'
@@ -21936,7 +21957,7 @@ public class C1 : I1
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (2,19): error CS0535: 'C1' does not implement interface member 'I1.M01'
@@ -21965,7 +21986,7 @@ static event System.Action I1.M01 { remove {} }
var compilation2 = CreateCompilationWithIL(source2, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation2.VerifyDiagnostics(
// (4,34): error CS0065: 'C1.I1.M01': event property must have both add and remove accessors
@@ -21994,7 +22015,7 @@ public static event System.Action M01 { add{} remove{} }
var compilation3 = CreateCompilationWithIL(source3, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
CompileAndVerify(compilation3, sourceSymbolValidator: validate3, symbolValidator: validate3, verify: Verification.Skipped).VerifyDiagnostics();
@@ -22066,7 +22087,7 @@ static event System.Action I1.M01 { add{} remove{} }
var compilation4 = CreateCompilationWithIL(source4, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation4.VerifyDiagnostics(
// (4,40): error CS0550: 'C1.I1.M01.add' adds an accessor not found in interface member 'I1.M01'
@@ -22096,7 +22117,7 @@ public static event System.Action M01 { remove{} }
var compilation5 = CreateCompilationWithIL(source5, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation5.VerifyDiagnostics(
// (4,38): error CS0065: 'C1.M01': event property must have both add and remove accessors
@@ -22123,7 +22144,7 @@ public static event System.Action M01 { add{} }
var compilation6 = CreateCompilationWithIL(source6, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation6.VerifyDiagnostics(
// (2,19): error CS0535: 'C1' does not implement interface member 'I1.M01.remove'
@@ -22153,7 +22174,7 @@ static event System.Action I1.M01 { add{} }
var compilation7 = CreateCompilationWithIL(source7, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation7.VerifyDiagnostics(
// (2,19): error CS0535: 'C1' does not implement interface member 'I1.M01.remove'
@@ -22247,7 +22268,7 @@ public class C1 : I2
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyEmitDiagnostics(
// (2,19): error CS0535: 'C1' does not implement interface member 'I1.M01'
@@ -22297,7 +22318,7 @@ class C2 : C1, I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -22498,7 +22519,7 @@ class C4 : I2
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -22802,7 +22823,7 @@ public class C2 : C1, I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
@@ -22819,7 +22840,7 @@ public class C3 : C2, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
}
@@ -22915,7 +22936,7 @@ public class C2 : C1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
@@ -22932,7 +22953,7 @@ public class C3 : C2, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
var verifier = CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -23043,8 +23064,8 @@ public class C1 : I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp,
- references: new[] { CreateCompilation("", targetFramework: TargetFramework.NetCoreApp).ToMetadataReference() });
+ targetFramework: _supportingFramework,
+ references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() });
Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().OfType().Where(m => m.Name.Contains("M01")).Count());
compilation1.VerifyDiagnostics();
@@ -23062,7 +23083,7 @@ public class C2 : C1, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -23112,8 +23133,8 @@ public class C1 : I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp,
- references: new[] { CreateCompilation("", targetFramework: TargetFramework.NetCoreApp).ToMetadataReference() });
+ targetFramework: _supportingFramework,
+ references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() });
Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().OfType().Where(m => m.Name.Contains("M01")).Count());
@@ -23132,7 +23153,7 @@ public class C2 : C1, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -23236,7 +23257,7 @@ public interface I2 where T : I2
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (8,10): error CS0535: 'C1' does not implement interface member 'I1.explicit operator int(C1)'
@@ -23370,7 +23391,7 @@ interface I14 : I1 where T : I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics(
// (12,23): error CS0556: User-defined conversion must convert to or from the enclosing type
@@ -23486,11 +23507,11 @@ public interface I2 where T : I2
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { compilation1.ToMetadataReference() });
compilation2.VerifyDiagnostics(
@@ -23501,7 +23522,7 @@ public interface I2 where T : I2
var compilation3 = CreateCompilation(source2 + source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation3.VerifyDiagnostics(
// (4,21): error CS8652: The feature 'static abstract members in interfaces' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version.
@@ -23535,7 +23556,7 @@ public interface I1 where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
@@ -23584,7 +23605,7 @@ public interface I1 where T : I1
";
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
@@ -23638,7 +23659,7 @@ public interface I1 where T : I1
var opName = ConversionOperatorName(op);
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -23730,7 +23751,7 @@ interface I1 where T : I1
var opName = ConversionOperatorName(op);
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var tree = compilation1.SyntaxTrees.Single();
var model = compilation1.GetSemanticModel(tree);
@@ -23808,7 +23829,7 @@ public class C2 : I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
@@ -23827,7 +23848,7 @@ public class C3 : C2, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
}
@@ -23944,7 +23965,7 @@ public class C5 : C2, I1
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
@@ -23977,7 +23998,7 @@ public class C5 : C2, I1
compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
}
@@ -24014,7 +24035,7 @@ public class C1 : I1
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyEmitDiagnostics();
@@ -24028,7 +24049,7 @@ public class C1 : I1
compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.Regular9,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyEmitDiagnostics();
@@ -24042,7 +24063,7 @@ public class C1 : I1
var compilation2 = CreateCompilationWithIL(source2, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation2.VerifyEmitDiagnostics(
// (4,37): error CS0539: 'C1.implicit operator int(C1)' in explicit interface declaration is not found among members of the interface that can be implemented
@@ -24102,7 +24123,7 @@ public class C1 : I2
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyEmitDiagnostics(
// (2,19): error CS0535: 'C1' does not implement interface member 'I1.explicit operator int(C1)'
@@ -24149,7 +24170,7 @@ public class C2 : C1, I1
var opName = ConversionOperatorName(op);
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -24249,7 +24270,7 @@ class C2 : I1
var compilation1 = CreateCompilationWithIL(source1, ilSource, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
@@ -24350,7 +24371,7 @@ public class C2 : C1, I1
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp);
+ targetFramework: _supportingFramework);
compilation1.VerifyDiagnostics();
@@ -24369,7 +24390,7 @@ public class C3 : C2, I1
{
var compilation2 = CreateCompilation(source2, options: TestOptions.DebugDll,
parseOptions: parseOptions,
- targetFramework: TargetFramework.NetCoreApp,
+ targetFramework: _supportingFramework,
references: new[] { reference });
CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics();
}
@@ -24445,8 +24466,8 @@ public class C1 : I1, U>
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll,
parseOptions: TestOptions.RegularPreview,
- targetFramework: TargetFramework.NetCoreApp,
- references: new[] { CreateCompilation("", targetFramework: TargetFramework.NetCoreApp).ToMetadataReference() });
+ targetFramework: _supportingFramework,
+ references: new[] { CreateCompilation("", targetFramework: _supportingFramework).ToMetadataReference() });
compilation1.VerifyDiagnostics();
Assert.Equal(2, compilation1.GlobalNamespace.GetTypeMember("C1").GetMembers().Where(m => m.Name.Contains(opName)).Count());
@@ -24464,7 +24485,7 @@ public class C2 : C1, I1