Skip to content

Commit

Permalink
[Core] Avoid ambiguous call
Browse files Browse the repository at this point in the history
CS0121: The call is ambiguous between the following methods or
properties: 'Device.InvokeOnMainThreadAsync(Action)' and
'Device.InvokeOnMainThreadAsync(Func<Task>)'

dotnet/roslyn#14885
dotnet/csharplang#98
  • Loading branch information
dahlbyk committed Jul 9, 2019
1 parent f2c5feb commit 6fbfd67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Xamarin.Forms.Core/Device.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public static Task<T> InvokeOnMainThreadAsync<T>(Func<T> func)

public static Task InvokeOnMainThreadAsync(Action action)
{
object wrapAction() { action(); return null; }
string wrapAction() { action(); return null; }
return InvokeOnMainThreadAsync(wrapAction);
}

Expand Down

0 comments on commit 6fbfd67

Please sign in to comment.