diff options
author | Miguel de Icaza <miguel@gnome.org> | 2002-02-14 02:28:34 +0300 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2002-02-14 02:28:34 +0300 |
commit | aefe6a0b33c8d63b5326259520fb02f13104a32b (patch) | |
tree | 72c020f6089b396fdf62c253ccf9896c27aa536c | |
parent | 19b91de662e0bb433ae3944298c5e9f634213454 (diff) |
2002-02-13 Miguel de Icaza <miguel@ximian.com>
* driver.cs (GetSystemDir): Compute correctly the location of our
system assemblies. I was using the compiler directory instead of
the library directory.
svn path=/trunk/mcs/; revision=2392
-rwxr-xr-x | mcs/mcs/ChangeLog | 6 | ||||
-rwxr-xr-x | mcs/mcs/driver.cs | 14 | ||||
-rwxr-xr-x | mcs/mcs/statement.cs | 3 |
3 files changed, 18 insertions, 5 deletions
diff --git a/mcs/mcs/ChangeLog b/mcs/mcs/ChangeLog index 9fbe9357565..23cc33b043d 100755 --- a/mcs/mcs/ChangeLog +++ b/mcs/mcs/ChangeLog @@ -1,3 +1,9 @@ +2002-02-13 Miguel de Icaza <miguel@ximian.com> + + * driver.cs (GetSystemDir): Compute correctly the location of our + system assemblies. I was using the compiler directory instead of + the library directory. + 2002-02-13 Ravi Pratap <ravi@ximian.com> * expression.cs (BetterFunction): Put back in what Miguel commented out diff --git a/mcs/mcs/driver.cs b/mcs/mcs/driver.cs index 29fe11c9b1c..baf9b0ea338 100755 --- a/mcs/mcs/driver.cs +++ b/mcs/mcs/driver.cs @@ -280,9 +280,17 @@ namespace Mono.CSharp static string GetSystemDir () { Assembly [] assemblies = AppDomain.CurrentDomain.GetAssemblies (); - string s = assemblies [0].CodeBase; - - return s.Substring (0, s.LastIndexOf ("/")); + + foreach (Assembly a in assemblies){ + if (a.FullName.EndsWith ("corlib.dll")){ + string s = a.CodeBase; + + return s.Substring (0, s.LastIndexOf ("/")); + } + } + + Report.Error (-15, "Can not compute my system path"); + return ""; } /// <summary> diff --git a/mcs/mcs/statement.cs b/mcs/mcs/statement.cs index 85a539951ff..44ea25608e8 100755 --- a/mcs/mcs/statement.cs +++ b/mcs/mcs/statement.cs @@ -1732,7 +1732,7 @@ namespace Mono.CSharp { Expression e = (Expression) p.Second; // - // The rules for the possible declarators are narrow, + // The rules for the possible declarators are pretty wise, // but the production on the grammar is more concise. // // So we have to enforce these rules here @@ -1756,7 +1756,6 @@ namespace Mono.CSharp { if (!TypeManager.VerifyUnManaged (e.Type, loc)) continue; - } e = e.Resolve (ec); |