|
Bugzilla – Full Text Bug Listing |
| Summary: | Missing error CS0136 for same variable in switch statement cases | ||
|---|---|---|---|
| Product: | [Mono] Mono: Compilers | Reporter: | Jonathan Chambers <joncham> |
| Component: | C# | Assignee: | Marek Safar <msafar> |
| Status: | RESOLVED DUPLICATE | QA Contact: | Mono Bugs <mono-bugs> |
| Severity: | Normal | ||
| Priority: | P5 - None | ||
| Version: | SVN | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: | Testcase | ||
FYI, I found this bug when trying to compile the debugger on Windows. So, once this is fixed the debugger will have compile errors. This causes problems building System.dll with csc. I get the following error with CSC that is not present with the mono compiler (r158840). System.Security.Cryptography.X509Certificates\X509Certificate2Collection.cs(223,12): error CS0136: A local variable named 'msg' cannot be declared in this scope because it would give a different meaning to 'msg', which is already used in a 'child' scope to denote something else Reassigning to Miguel to drive further resolution... Duplicate *** This bug has been marked as a duplicate of bug 370414 *** |
Created attachment 274298 [details] Testcase Description of Problem: gmcs does not give an error on the attached test case while csc does. Steps to reproduce the problem: 1. Try and compile attached test.cs: gmcs test.cs 2. Actual Results: Successful compile Expected Results: test.cs(18,8): error CS0136: A local variable named 'a' cannot be declared in this scope because it would give a different meaning to 'a', which is already used in a 'child' scope to denote something else How often does this happen? Everytime Additional Information: