2003/02/22 Rafael Teixeira <rafaelteixeirabr@hotmail.com>
authorRafael Teixeira <monoman@gmail.com>
Sat, 22 Feb 2003 20:04:41 +0000 (20:04 -0000)
committerRafael Teixeira <monoman@gmail.com>
Sat, 22 Feb 2003 20:04:41 +0000 (20:04 -0000)
* class.cs : As, per vbc, there is a rootnamespace now, --main wasn't working anymore,
 because it was expecting a fully qualified class name.
 We now also test the name passed prepended by the rootnamespace.
* class.cs : Corrected warning "The keyword new is required on `Mono.CSharp.Property.Emit'
 because it hides inherited member `PropertyBase.Emit'", by making it virtual
 in PropertyBase and override in Property.
* makefile.gnu : test and test-gtk targets now depend on mbas.exe

svn path=/trunk/mcs/; revision=11845

mcs/mbas/ChangeLog
mcs/mbas/class.cs
mcs/mbas/driver.cs
mcs/mbas/makefile.gnu

index 07d6dac2a148dcf00efb6a5b47ccaff5887f6ee8..cbe4666c4197c16f2e290c31ac3a8679fa841448 100644 (file)
@@ -1,3 +1,13 @@
+2003/02/22  Rafael Teixeira <rafaelteixeirabr@hotmail.com>\r
+       * class.cs : As, per vbc, there is a rootnamespace now, --main wasn't working anymore, \r
+                                because it was expecting a fully qualified class name. \r
+                                We now also test the name passed prepended by the rootnamespace.\r
+       * class.cs : Corrected warning "The keyword new is required on `Mono.CSharp.Property.Emit'\r
+                                because it hides inherited member `PropertyBase.Emit'", by making it virtual\r
+                                in PropertyBase and override in Property.\r
+       * makefile.gnu : test and test-gtk targets now depend on mbas.exe\r
+                                \r
+\r
 2003/02/19  Rafael Teixeira <rafaelteixeirabr@hotmail.com>\r
        * mb-parser.jay : eliminated reduce/reduce conflict on duplicated rank_specifier rule
          by renaming the one using brackets to bracketed_rank_specifier\r
index 80c6eac30334df8f01a9a91426965831b1bc2388..3baf0e0fd617905a9cdaac93c898cd98c76704be 100644 (file)
@@ -2383,7 +2383,10 @@ namespace Mono.CSharp {
                        if (Name == "Main" &&
                            ((ModFlags & Modifiers.STATIC) != 0) && 
                            (RootContext.MainClass == null ||
-                            RootContext.MainClass == parent.TypeBuilder.FullName)){
+                            RootContext.MainClass == parent.TypeBuilder.FullName ||
+                            (RootContext.RootNamespace != null &&
+                                 RootContext.RootNamespace.Length > 0 &&
+                                 (RootContext.RootNamespace + "." + RootContext.MainClass) == parent.TypeBuilder.FullName))) {
                                 if (IsEntryPoint (MethodBuilder, ParameterInfo)) {
                                         if (RootContext.EntryPoint == null) {
                                                 RootContext.EntryPoint = MethodBuilder;
@@ -3638,7 +3641,7 @@ namespace Mono.CSharp {
                        return true;
                }
 
-               public void Emit (TypeContainer tc)
+               public virtual void Emit (TypeContainer tc)
                {
                        //
                        // The PropertyBuilder can be null for explicit implementations, in that
@@ -3839,7 +3842,7 @@ namespace Mono.CSharp {
                        return true;
                }
 
-               public void Emit (TypeContainer tc)
+               public override void Emit (TypeContainer tc)
                {
                        base.Emit (tc);
                        
index 7610ae3555f2376595912046fb39b6d97b649238..948fd593e7458356e4a4b42db9772bb4a92f633a 100644 (file)
@@ -287,7 +287,9 @@ namespace Mono.Languages
                        return WhatToDoNext.GoAhead;\r
                }\r
 \r
-               [Option("Specifies the Class or Module that contains Sub Main.It can also be a Class that inherits from System.Windows.Forms.Form.", 'm', "main")]\r
+               [Option(@"Specifies the Class or Module that contains Sub Main.
+                       It can also be a Class that inherits from System.Windows.Forms.Form.",
+                       'm', "main")]\r
                public string main { set { RootContext.MainClass = value; } }\r
 \r
                // TODO: handle VB.NET [+|-] boolean syntax\r
@@ -794,7 +796,7 @@ namespace Mono.Languages
                      RootContext.RootNamespace =\r
                          System.IO.Path.GetFileNameWithoutExtension(outputFileName);\r
                    }\r
-               \r
+\r
                        if (!ParseAll()) // Phase 1\r
                                return;\r
 \r
index 92214794a45cd73eefe40f2f81ae6dfed5c35aac..a08373fc1fcbd05a81dd49359d9d130209913546 100644 (file)
@@ -54,9 +54,9 @@ install: all
        mkdir -p $(prefix)/bin/
        $(INSTALL) -m 755 mbas.exe $(prefix)/bin/
 
-test:
+test: mbas.exe
        mono mbas.exe --main WriteOK testmbas/WriteOK.vb
 
-test-gtk:
+test-gtk: mbas.exe
        mono mbas.exe testmbas/gtk.vb -r gtk-sharp