mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Moved scope of 'if (Call(var X))' arguments into the if parent's scope
This commit is contained in:
parent
5b8d2ffee2
commit
965e2e2930
4 changed files with 79 additions and 0 deletions
|
@ -228,5 +228,63 @@ namespace IDETest
|
|||
int c = b; //FAIL
|
||||
}
|
||||
}
|
||||
|
||||
public bool GetVal(out int a)
|
||||
{
|
||||
a = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Local1()
|
||||
{
|
||||
if ((GetVal(var a)) && (GetVal(var b)))
|
||||
{
|
||||
int c = a;
|
||||
int d = b;
|
||||
}
|
||||
|
||||
int e = a;
|
||||
int f = b; //FAIL
|
||||
}
|
||||
|
||||
public void Local2()
|
||||
{
|
||||
int a;
|
||||
int b;
|
||||
if ((GetVal(out a)) && (GetVal(out b)))
|
||||
{
|
||||
int c = a;
|
||||
int d = b;
|
||||
}
|
||||
|
||||
int e = a;
|
||||
int f = b; //FAIL
|
||||
}
|
||||
|
||||
public void Local3()
|
||||
{
|
||||
if ((GetVal(var a)) || (GetVal(var b))) //FAIL
|
||||
{
|
||||
int c = a;
|
||||
int d = b;
|
||||
}
|
||||
|
||||
int e = a;
|
||||
int f = b; //FAIL
|
||||
}
|
||||
|
||||
public void Local4()
|
||||
{
|
||||
int a;
|
||||
int b;
|
||||
if ((GetVal(out a)) || (GetVal(out b)))
|
||||
{
|
||||
int c = a;
|
||||
int d = b; //FAIL
|
||||
}
|
||||
|
||||
int e = a;
|
||||
int f = b; //FAIL
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue