Skip to content

Commit

Permalink
Added a new test for RuntimeType.CreateInstanceImpl throws MissingMet…
Browse files Browse the repository at this point in the history
…hodException properly.
  • Loading branch information
Takym committed Oct 18, 2024
1 parent 75b3c3a commit e4a8824
Showing 1 changed file with 59 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,65 @@ public void CreateInstance_PublicOnlyTypeWithPrivateDefaultConstructor_ThrowsMis
Assert.Throws<MissingMethodException>(() => Activator.CreateInstance(typeof(TypeWithPrivateDefaultConstructor), nonPublic: false));
}

[Fact]
public void CreateInstance_WithCustomBinder_ThrowsMissingMethodException()
{
// MissingMethodException not caused by a binder must not contain an inner exception.
var mme = Assert.Throws<MissingMethodException>(() => Activator.CreateInstance(typeof(TypeWithPrivateDefaultConstructor), nonPublic: false));
Assert.Contains("System.Tests.ActivatorTests.TypeWithPrivateDefaultConstructor", mme.Message);
Assert.Null(mme.InnerException);

// MissingMethodException caused by a binder must be wrapped.
mme = Assert.Throws<MissingMethodException>(() => Activator.CreateInstance(
typeof(object), BindingFlags.CreateInstance,
new CustomBinder() { BindToMethodAction = () => throw new MissingMethodException("Hello, World!!") },
null, null, null
));
Assert.Contains("System.Object", mme.Message);
Assert.NotNull(mme.InnerException);
Assert.IsType<MissingMethodException>(mme.InnerException);
Assert.StrictEqual("Hello, World!!", mme.InnerException.Message);

Check failure on line 127 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build tvos-arm64 Release AllSubsets_Mono)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L127

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(127,13): error xUnit2006: (NETCORE_ENGINEERING_TELEMETRY=Build) Do not use Assert.StrictEqual to test for string equality. Use Assert.Equal instead. (https://xunit.net/xunit.analyzers/rules/xUnit2006)

Check failure on line 127 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build ios-arm64 Release AllSubsets_Mono)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L127

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(127,13): error xUnit2006: (NETCORE_ENGINEERING_TELEMETRY=Build) Do not use Assert.StrictEqual to test for string equality. Use Assert.Equal instead. (https://xunit.net/xunit.analyzers/rules/xUnit2006)

Check failure on line 127 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build android-arm Release AllSubsets_Mono)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L127

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(127,13): error xUnit2006: (NETCORE_ENGINEERING_TELEMETRY=Build) Do not use Assert.StrictEqual to test for string equality. Use Assert.Equal instead. (https://xunit.net/xunit.analyzers/rules/xUnit2006)

Check failure on line 127 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build android-arm64 Release AllSubsets_Mono)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L127

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(127,13): error xUnit2006: (NETCORE_ENGINEERING_TELEMETRY=Build) Do not use Assert.StrictEqual to test for string equality. Use Assert.Equal instead. (https://xunit.net/xunit.analyzers/rules/xUnit2006)

Check failure on line 127 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build maccatalyst-x64 Release AllSubsets_Mono)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L127

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(127,13): error xUnit2006: (NETCORE_ENGINEERING_TELEMETRY=Build) Do not use Assert.StrictEqual to test for string equality. Use Assert.Equal instead. (https://xunit.net/xunit.analyzers/rules/xUnit2006)

Check failure on line 127 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug Mono_MiniJIT_LibrariesTests)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L127

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(127,13): error xUnit2006: (NETCORE_ENGINEERING_TELEMETRY=Build) Do not use Assert.StrictEqual to test for string equality. Use Assert.Equal instead. (https://xunit.net/xunit.analyzers/rules/xUnit2006)

Check failure on line 127 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug Mono_Interpreter_LibrariesTests)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L127

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(127,13): error xUnit2006: (NETCORE_ENGINEERING_TELEMETRY=Build) Do not use Assert.StrictEqual to test for string equality. Use Assert.Equal instead. (https://xunit.net/xunit.analyzers/rules/xUnit2006)

Check failure on line 127 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug Mono_MiniJIT_LibrariesTests)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L127

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(127,13): error xUnit2006: (NETCORE_ENGINEERING_TELEMETRY=Build) Do not use Assert.StrictEqual to test for string equality. Use Assert.Equal instead. (https://xunit.net/xunit.analyzers/rules/xUnit2006)

Check failure on line 127 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests_Smoke_AOT)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L127

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(127,13): error xUnit2006: (NETCORE_ENGINEERING_TELEMETRY=Build) Do not use Assert.StrictEqual to test for string equality. Use Assert.Equal instead. (https://xunit.net/xunit.analyzers/rules/xUnit2006)

Check failure on line 127 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests_Threading)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L127

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(127,13): error xUnit2006: (NETCORE_ENGINEERING_TELEMETRY=Build) Do not use Assert.StrictEqual to test for string equality. Use Assert.Equal instead. (https://xunit.net/xunit.analyzers/rules/xUnit2006)

Check failure on line 127 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Debug Mono_MiniJIT_LibrariesTests)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L127

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(127,13): error xUnit2006: (NETCORE_ENGINEERING_TELEMETRY=Build) Do not use Assert.StrictEqual to test for string equality. Use Assert.Equal instead. (https://xunit.net/xunit.analyzers/rules/xUnit2006)

Check failure on line 127 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L127

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(127,13): error xUnit2006: (NETCORE_ENGINEERING_TELEMETRY=Build) Do not use Assert.StrictEqual to test for string equality. Use Assert.Equal instead. (https://xunit.net/xunit.analyzers/rules/xUnit2006)

Check failure on line 127 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-arm checked CoreCLR_ReleaseLibraries)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L127

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(127,13): error xUnit2006: (NETCORE_ENGINEERING_TELEMETRY=Build) Do not use Assert.StrictEqual to test for string equality. Use Assert.Equal instead. (https://xunit.net/xunit.analyzers/rules/xUnit2006)

Check failure on line 127 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug CoreCLR_Libraries)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L127

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(127,13): error xUnit2006: (NETCORE_ENGINEERING_TELEMETRY=Build) Do not use Assert.StrictEqual to test for string equality. Use Assert.Equal instead. (https://xunit.net/xunit.analyzers/rules/xUnit2006)

Check failure on line 127 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests_EAT)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L127

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(127,13): error xUnit2006: (NETCORE_ENGINEERING_TELEMETRY=Build) Do not use Assert.StrictEqual to test for string equality. Use Assert.Equal instead. (https://xunit.net/xunit.analyzers/rules/xUnit2006)

Check failure on line 127 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-x64 Debug CoreCLR_Libraries)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L127

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(127,13): error xUnit2006: (NETCORE_ENGINEERING_TELEMETRY=Build) Do not use Assert.StrictEqual to test for string equality. Use Assert.Equal instead. (https://xunit.net/xunit.analyzers/rules/xUnit2006)

Check failure on line 127 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-arm64 checked CoreCLR_ReleaseLibraries)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L127

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(127,13): error xUnit2006: (NETCORE_ENGINEERING_TELEMETRY=Build) Do not use Assert.StrictEqual to test for string equality. Use Assert.Equal instead. (https://xunit.net/xunit.analyzers/rules/xUnit2006)

Check failure on line 127 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-x64 Debug Libraries_CheckedCoreCLR)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L127

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(127,13): error xUnit2006: (NETCORE_ENGINEERING_TELEMETRY=Build) Do not use Assert.StrictEqual to test for string equality. Use Assert.Equal instead. (https://xunit.net/xunit.analyzers/rules/xUnit2006)

Check failure on line 127 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Debug Libraries_CheckedCoreCLR)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L127

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(127,13): error xUnit2006: (NETCORE_ENGINEERING_TELEMETRY=Build) Do not use Assert.StrictEqual to test for string equality. Use Assert.Equal instead. (https://xunit.net/xunit.analyzers/rules/xUnit2006)

Check failure on line 127 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug Libraries_CheckedCoreCLR)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L127

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(127,13): error xUnit2006: (NETCORE_ENGINEERING_TELEMETRY=Build) Do not use Assert.StrictEqual to test for string equality. Use Assert.Equal instead. (https://xunit.net/xunit.analyzers/rules/xUnit2006)

Check failure on line 127 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug CoreCLR_Libraries)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L127

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(127,13): error xUnit2006: (NETCORE_ENGINEERING_TELEMETRY=Build) Do not use Assert.StrictEqual to test for string equality. Use Assert.Equal instead. (https://xunit.net/xunit.analyzers/rules/xUnit2006)

Check failure on line 127 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 checked CoreCLR_ReleaseLibraries)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L127

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(127,13): error xUnit2006: (NETCORE_ENGINEERING_TELEMETRY=Build) Do not use Assert.StrictEqual to test for string equality. Use Assert.Equal instead. (https://xunit.net/xunit.analyzers/rules/xUnit2006)

// Any other exceptions will not be caught.
Assert.Throws<Exception>(() => Activator.CreateInstance(
typeof(object), BindingFlags.CreateInstance,
new CustomBinder() { BindToMethodAction = () => throw new Exception() },
null, null, null
));

// MissingMethodException must not contain an inner exception when BindToMethod returns null.
mme = Assert.Throws<MissingMethodException>(() => Activator.CreateInstance(
typeof(object), BindingFlags.CreateInstance,
new CustomBinder() { BindToMethodAction = () => null },
null, null, null
));
Assert.Contains("System.Object", mme.Message);
Assert.Null(mme.InnerException);
}

class CustomBinder : Binder
{
public required Func<MethodBase?> BindToMethodAction { get; init; }

public override MethodBase BindToMethod(BindingFlags bindingAttr, MethodBase[] match, ref object?[] args, ParameterModifier[]? modifiers, CultureInfo? culture, string[]? names, out object? state)
=> this.BindToMethodAction()!;

Check failure on line 151 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build tvos-arm64 Release AllSubsets_Mono)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L151

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(151,20): error CS0177: (NETCORE_ENGINEERING_TELEMETRY=Build) The out parameter 'state' must be assigned to before control leaves the current method

Check failure on line 151 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build ios-arm64 Release AllSubsets_Mono)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L151

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(151,20): error CS0177: (NETCORE_ENGINEERING_TELEMETRY=Build) The out parameter 'state' must be assigned to before control leaves the current method

Check failure on line 151 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build android-arm Release AllSubsets_Mono)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L151

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(151,20): error CS0177: (NETCORE_ENGINEERING_TELEMETRY=Build) The out parameter 'state' must be assigned to before control leaves the current method

Check failure on line 151 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build android-arm64 Release AllSubsets_Mono)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L151

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(151,20): error CS0177: (NETCORE_ENGINEERING_TELEMETRY=Build) The out parameter 'state' must be assigned to before control leaves the current method

Check failure on line 151 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build maccatalyst-x64 Release AllSubsets_Mono)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L151

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(151,20): error CS0177: (NETCORE_ENGINEERING_TELEMETRY=Build) The out parameter 'state' must be assigned to before control leaves the current method

Check failure on line 151 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Release NativeAOT_Libraries)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L151

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(151,20): error CS0177: (NETCORE_ENGINEERING_TELEMETRY=Build) The out parameter 'state' must be assigned to before control leaves the current method

Check failure on line 151 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug Mono_MiniJIT_LibrariesTests)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L151

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(151,20): error CS0177: (NETCORE_ENGINEERING_TELEMETRY=Build) The out parameter 'state' must be assigned to before control leaves the current method

Check failure on line 151 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug Mono_Interpreter_LibrariesTests)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L151

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(151,20): error CS0177: (NETCORE_ENGINEERING_TELEMETRY=Build) The out parameter 'state' must be assigned to before control leaves the current method

Check failure on line 151 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-arm64 Release NativeAOT_Libraries)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L151

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(151,20): error CS0177: (NETCORE_ENGINEERING_TELEMETRY=Build) The out parameter 'state' must be assigned to before control leaves the current method

Check failure on line 151 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug Mono_MiniJIT_LibrariesTests)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L151

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(151,20): error CS0177: (NETCORE_ENGINEERING_TELEMETRY=Build) The out parameter 'state' must be assigned to before control leaves the current method

Check failure on line 151 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests_Smoke_AOT)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L151

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(151,20): error CS0177: (NETCORE_ENGINEERING_TELEMETRY=Build) The out parameter 'state' must be assigned to before control leaves the current method

Check failure on line 151 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests_Threading)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L151

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(151,20): error CS0177: (NETCORE_ENGINEERING_TELEMETRY=Build) The out parameter 'state' must be assigned to before control leaves the current method

Check failure on line 151 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Debug Mono_MiniJIT_LibrariesTests)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L151

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(151,20): error CS0177: (NETCORE_ENGINEERING_TELEMETRY=Build) The out parameter 'state' must be assigned to before control leaves the current method

Check failure on line 151 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L151

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(151,20): error CS0177: (NETCORE_ENGINEERING_TELEMETRY=Build) The out parameter 'state' must be assigned to before control leaves the current method

Check failure on line 151 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-arm checked CoreCLR_ReleaseLibraries)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L151

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(151,20): error CS0177: (NETCORE_ENGINEERING_TELEMETRY=Build) The out parameter 'state' must be assigned to before control leaves the current method

Check failure on line 151 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug CoreCLR_Libraries)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L151

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(151,20): error CS0177: (NETCORE_ENGINEERING_TELEMETRY=Build) The out parameter 'state' must be assigned to before control leaves the current method

Check failure on line 151 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests_EAT)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L151

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(151,20): error CS0177: (NETCORE_ENGINEERING_TELEMETRY=Build) The out parameter 'state' must be assigned to before control leaves the current method

Check failure on line 151 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-x64 Debug CoreCLR_Libraries)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L151

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(151,20): error CS0177: (NETCORE_ENGINEERING_TELEMETRY=Build) The out parameter 'state' must be assigned to before control leaves the current method

Check failure on line 151 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-arm64 checked CoreCLR_ReleaseLibraries)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L151

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(151,20): error CS0177: (NETCORE_ENGINEERING_TELEMETRY=Build) The out parameter 'state' must be assigned to before control leaves the current method

Check failure on line 151 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-x64 Debug Libraries_CheckedCoreCLR)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L151

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(151,20): error CS0177: (NETCORE_ENGINEERING_TELEMETRY=Build) The out parameter 'state' must be assigned to before control leaves the current method

Check failure on line 151 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Debug Libraries_CheckedCoreCLR)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L151

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(151,20): error CS0177: (NETCORE_ENGINEERING_TELEMETRY=Build) The out parameter 'state' must be assigned to before control leaves the current method

Check failure on line 151 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug Libraries_CheckedCoreCLR)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L151

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(151,20): error CS0177: (NETCORE_ENGINEERING_TELEMETRY=Build) The out parameter 'state' must be assigned to before control leaves the current method

Check failure on line 151 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug CoreCLR_Libraries)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L151

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(151,20): error CS0177: (NETCORE_ENGINEERING_TELEMETRY=Build) The out parameter 'state' must be assigned to before control leaves the current method

Check failure on line 151 in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 checked CoreCLR_ReleaseLibraries)

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs#L151

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ActivatorTests.cs(151,20): error CS0177: (NETCORE_ENGINEERING_TELEMETRY=Build) The out parameter 'state' must be assigned to before control leaves the current method

public override FieldInfo BindToField(BindingFlags bindingAttr, FieldInfo[] match, object value, CultureInfo? culture)
=> throw new NotImplementedException();

public override object ChangeType(object value, Type type, CultureInfo? culture)
=> throw new NotImplementedException();

public override void ReorderArgumentArray(ref object?[] args, object state)
=> throw new NotImplementedException();

public override MethodBase? SelectMethod(BindingFlags bindingAttr, MethodBase[] match, Type[] types, ParameterModifier[]? modifiers)
=> throw new NotImplementedException();

public override PropertyInfo? SelectProperty(BindingFlags bindingAttr, PropertyInfo[] match, Type? returnType, Type[]? indexes, ParameterModifier[]? modifiers)
=> throw new NotImplementedException();
}

[Fact]
public void CreateInstance_NullableType_ReturnsNull()
{
Expand Down

0 comments on commit e4a8824

Please sign in to comment.