Bug 370402

Summary: Missing CS0165
Product: [Mono] Mono: Compilers Reporter: Jonathan Pobst <jpobst>
Component: C#Assignee: Mono Bugs <mono-bugs>
Status: RESOLVED DUPLICATE QA Contact: Mono Bugs <mono-bugs>
Severity: Normal    
Priority: P5 - None CC: harinath
Version: 1.9   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Test Case

Description Jonathan Pobst 2008-03-13 15:10:08 UTC
Created attachment 201281 [details]
Test Case

The attached sample should produce 2 CS0165 errors:

Use of unassigned local variable 'ms'.
Use of unassigned local variable 'ms2'.

Both mcs and gmcs compile without error.

This case is derived from trying to compile MonoDevelop with csc:
SearchResultPad.cs: Line 472, Variable selIter.
ErrorListPad.cs: Line 737, Variable selIter.
Comment 1 Michael Hutchinson 2008-03-21 03:40:08 UTC
Actually, the MD code is logically fine, but presumably csc's flow analysis doesn't fully resolve it. I committed a "fix" to MD anyway.
Comment 2 Raja Harinath 2008-03-31 06:11:30 UTC
It still is a bug in mcs, since it gets the _static_ analysis wrong.


*** This bug has been marked as a duplicate of bug 314500 ***