Project
ReSharper
Priority
Critical
Type
Bug
Fix versions
3.0
State
Fixed
Assignee
Evgeny Pasynkov
Subsystem
Code Analysis
Affected versions
No Affected versions
Fixed in build
No Fixed in build
  • Created by   Vladimir Reshetnikov
    5 years ago (23 Dec 2006 17:52)
  • Updated by   Vladimir Reshetnikov
    4 years ago (23 May 2007 17:47)
  • Jira: RSRP-33871
    (history, comments)
 
RSRP-33871 error CS0165: Use of unassigned local variable 'z'
0
Issue is visible to: All Users
  The issue is visible to the selected user group only
class Stuff
{
	private static void Foo(out int y, int x)
	{
		int z;
		Foo(out z, z); // error CS0165: Use of unassigned local variable 'z'
		y = z;
	}
}


12.3.3.21 Invocation expressions and object creation expressions
If the variable v is passed as an out argument (i.e., an argument of the form "out v") in any of the
arguments, then the state of v after expr is definitely assigned. Otherwise, the state of v after expr is the
same as the state of v after argn.



Issue was closed
Comments (0)
 
History
 
Linked Issues (?)
 
TeamCity Changes (0)
 
Issue has no comments