-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Description
Version Used:
Version 17.10.0 Preview 3.0 [34721.271.main]
Steps to Reproduce:
using System.Text.Json;
public class C
{
public static C M(IFoo foo, dynamic value)
{
var result = foo.Bar("name", value);
return JsonSerializer.Deserialize<C>(result);
}
}
public interface IFoo
{
object Bar(string name, object value);
}Expected Behavior:
Previously this compiled fine.
SharpLab
Actual Behavior:
Now it fails to compile:
error CS1503: Argument 1: cannot convert from 'object' to 'System.IO.Stream'
After the recent changes around dynamic, the type of result is now object whereas previously it was dynamic.
[jcouv:] Relates to #71421
Reactions are currently unavailable