diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/IL/ReadyToRunILProvider.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/IL/ReadyToRunILProvider.cs index 46ec240cba14e..ec9ced76c8da2 100644 --- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/IL/ReadyToRunILProvider.cs +++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/IL/ReadyToRunILProvider.cs @@ -19,7 +19,7 @@ private MethodIL TryGetIntrinsicMethodILForActivator(MethodDesc method) && method.Name == "CreateInstance") { TypeDesc type = method.Instantiation[0]; - if (type.IsValueType && type.GetDefaultConstructor() == null) + if (type.IsValueType && type.GetParameterlessConstructor() == null) { // Replace the body with implementation that just returns "default" MethodDesc createDefaultInstance = method.OwningType.GetKnownMethod("CreateDefaultInstance", method.GetTypicalMethodDefinition().Signature);