2003-07-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[mono.git] / mcs / mbas / class.cs
index 3baf0e0fd617905a9cdaac93c898cd98c76704be..cd16de718c72dae11491555750d80d7047a7d9fe 100644 (file)
@@ -198,13 +198,15 @@ namespace Mono.CSharp {
                        types.Add (c);
                        
                        // FIXME: Do we really need to explicitly add an empty default static constructor?
-                       if (c.default_static_constructor == null) 
+                       // Apparently we don't
+/*                     if (c.default_static_constructor == null) 
                        {
                                bool isModule = c is Mono.MonoBASIC.Module;
                                Constructor dc = new Constructor ("New", Parameters.EmptyReadOnlyParameters, null, c.Location);
                                dc.ModFlags = isModule ? Modifiers.PUBLIC | Modifiers.STATIC : Modifiers.PUBLIC;                                
                                c.AddConstructor (dc);          
-                       }
+                       } 
+*/
                        // --------------------------------------------------------------                               
                                
                        return AdditionResult.Success;
@@ -1970,7 +1972,7 @@ namespace Mono.CSharp {
                        Modifiers.ABSTRACT |
                        Modifiers.SEALED |
                        Modifiers.UNSAFE;
-
+               
                public Class (TypeContainer parent, string name, int mod, Attributes attrs, Location l)
                        : base (parent, name, l)
                {
@@ -2467,17 +2469,17 @@ namespace Mono.CSharp {
                                loc);
                        
                        if (parent_constructor_group == null){
-                               Report.Error (1501, loc,
-                                      "Can not find a constructor for this argument list");
+                               string s = String.Format ("'{0}': Can not find a constructor for this argument list", t);
+                               Report.Error (1501, loc, s);
                                return false;
                        }
-                       
+
                        parent_constructor = (ConstructorInfo) Invocation.OverloadResolve (ec, 
                                (MethodGroupExpr) parent_constructor_group, argument_list, loc);
                        
                        if (parent_constructor == null){
-                               Report.Error (1501, loc,
-                                      "Can not find a constructor for this argument list");
+                               string s = String.Format ("'{0}': Can not find a constructor for this argument list", t);
+                               Report.Error (1501, loc, s);
                                return false;
                        }