Option Strict Off
Public Class TestDynamicUsage
Property Prop As Integer
Sub S()
Dim o As Object
o = New TestDynamicUsage
o.Prop = 1
End Sub
End Class
Erroneous output
public class TestDynamicUsage
{
public int Prop { get; set; }
public void S()
{
object o;
o = new TestDynamicUsage();
((dynamic)o).Prop = (object)1; //throws RuntimeBinderException: "Cannot implicitly convert type 'object' to 'int'" at run time
}
}
Expected output
public class TestDynamicUsage
{
public int Prop { get; set; }
public void S()
{
object o;
o = new TestDynamicUsage();
((dynamic)o).Prop = 1;
}
}
Details
Product in use: VS extension
Version in use: 3284c3d228040fc4d0ea9c5a05129b1b2c0fc858
Did you see it working in a previous version, which? No
Any other relevant information to the issue, or your interest in contributing a fix.
VB.Net input code
Erroneous output
Expected output
Details