Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nullable annotation of Engine.Invoke arguments #1403

Merged
merged 1 commit into from
Jan 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions Jint/Engine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ internal void PutValue(Reference reference, JsValue value)
/// <param name="propertyName">The name of the function to call.</param>
/// <param name="arguments">The arguments of the function call.</param>
/// <returns>The value returned by the function call.</returns>
public JsValue Invoke(string propertyName, params object[] arguments)
public JsValue Invoke(string propertyName, params object?[] arguments)
{
return Invoke(propertyName, null, arguments);
}
Expand All @@ -609,7 +609,7 @@ public JsValue Invoke(string propertyName, params object[] arguments)
/// <param name="thisObj">The this value inside the function call.</param>
/// <param name="arguments">The arguments of the function call.</param>
/// <returns>The value returned by the function call.</returns>
public JsValue Invoke(string propertyName, object? thisObj, object[] arguments)
public JsValue Invoke(string propertyName, object? thisObj, object?[] arguments)
{
var value = GetValue(propertyName);

Expand All @@ -622,7 +622,7 @@ public JsValue Invoke(string propertyName, object? thisObj, object[] arguments)
/// <param name="value">The function to call.</param>
/// <param name="arguments">The arguments of the function call.</param>
/// <returns>The value returned by the function call.</returns>
public JsValue Invoke(JsValue value, params object[] arguments)
public JsValue Invoke(JsValue value, params object?[] arguments)
{
return Invoke(value, null, arguments);
}
Expand All @@ -634,7 +634,7 @@ public JsValue Invoke(JsValue value, params object[] arguments)
/// <param name="thisObj">The this value inside the function call.</param>
/// <param name="arguments">The arguments of the function call.</param>
/// <returns>The value returned by the function call.</returns>
public JsValue Invoke(JsValue value, object? thisObj, object[] arguments)
public JsValue Invoke(JsValue value, object? thisObj, object?[] arguments)
{
var callable = value as ICallable;
if (callable is null)
Expand Down