Bug 3762 - Not emitting CS0165
Summary: Not emitting CS0165
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Marek Safar
Depends on:
Reported: 2012-03-05 20:04 UTC by Duncan Mak
Modified: 2013-11-29 03:39 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Test case (388 bytes, text/plain)
2012-03-05 20:04 UTC, Duncan Mak

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Duncan Mak 2012-03-05 20:04:00 UTC
Created attachment 1463 [details]
Test case

On Windows:

c:\cygwin\home\duncan\src>csc cs0165.cs
Microsoft (R) Visual C# 2010 Compiler version 4.0.30319.1
Copyright (C) Microsoft Corporation. All rights reserved.

cs0165.cs(10,44): error CS0165: Use of unassigned local variable 'bug'

With Mono (mono 2.10 and master): No error.
Comment 1 Duncan Mak 2012-03-05 20:05:37 UTC
We have code that looks like this in MonoDevelop, so that the build is green on Mac (running mcs) and red on Windows (running csc).
Comment 2 Marek Safar 2013-11-29 03:39:59 UTC
Fixed in master