Reporter | Lilia Shamsutdinova (Lilia.Shamsutdinova) |
---|---|
Created | Apr 18, 2018 6:24:48 PM |
Updated | Apr 19, 2018 8:59:28 PM |
Subsystem | Context Actions |
Assignee | Andrey Dyatlov (Andrey.Dyatlov) |
Priority | Critical |
State | Fixed In Branch |
Type | Bug |
Fix version | 2018.1.1 |
Affected versions | 2018.1 |
Fixed In Version ReSharper | Undefined |
VsVersion | VS 2017 RTM |
JetBrains ReSharper Ultimate 2018.1 12.0.20180418.033450-eap10d.
PersonBase.cs
public class PersonBase
{
public string Name;
public int Phone;
public void Deconstruct(out string name, out int phone)
{
name = Name;
phone = Phone;
}
}
Class1.cs
public class Class1
{
private void Test(int i)
{
foreach (var (s2, i1) in new List<PersonBase>())
{
}
}
}
- Invoke CA "Specify type explicitly" on
var
.
Actual result:
Uncompilable code:
foreach (PersonBase (s2, i1) in new List<PersonBase>())
{
}
Expected result:
Compilable code:
foreach ((string s2, int i1) in new List<PersonBase>())
{
}