[Mono-bugs] [Bug 79231][Wis] New - gmcs says "is inaccessible due to its protection level", but older mcs gives more descriptive is a `type' but a `type' was expected

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Aug 31 12:06:29 EDT 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by jrwren at gmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=79231

--- shadow/79231	2006-08-31 12:06:29.000000000 -0400
+++ shadow/79231.tmp.1083	2006-08-31 12:06:29.000000000 -0400
@@ -0,0 +1,59 @@
+Bug#: 79231
+Product: Mono: Compilers
+Version: 1.1
+OS: GNU/Linux [Other]
+OS Details: ubuntu
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: jrwren at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: gmcs says "is inaccessible due to its protection level", but older mcs gives more descriptive is a `type' but a `type' was expected
+
+Description of Problem:
+gmcs gives a less descriptive error message when incorrectly using a "new"
+in front of a Factory Method
+
+Steps to reproduce the problem:
+1. use "new" in front of a Factory Method
+2. Compile
+3. see error
+
+Actual Results:
+Main.cs(16,34): error CS0122:
+`Mono.Data.ProviderFactory.CreateConnectionFromConfig(string)' is
+inaccessible due to its protection level
+/opt/mono/lib/mono/gac/Mono.Data/2.0.0.0__0738eb9f132ed756/Mono.Data.dll:
+`Mono.Data.ProviderFactory.CreateConnectionFromConfig(string)', name of
+symbol related to previous error
+Compilation failed: 1 error(s), 0 warnings
+
+
+Expected Results:
+Main.cs(16,34): error CS0118: `MonoSqlLiteTest.Mono.Data.ProviderFactory'
+is a `type' but a `type' was expected
+Compilation failed: 1 error(s), 0 warnings
+
+How often does this happen? 
+every time.
+
+Additional Information:
+This is really just an "it would be nice if", because nice error messages
+are nice.
+
+I didn't feel qualified to set the Severity option, so I left as normal.
+
+Source:
+using System.Data;
+using Mono.Data;
+class Example {
+public void Main(string[] args)
+{  IDbConnection connection = new
+ProviderFactory.CreateConnectionFromConfig("test");  
+}


More information about the mono-bugs mailing list