+2008-09-03 Miguel de Icaza <miguel@novell.com>
+
+ * driver.cs (ProcessDefaultConfig): Now it encapsulates all the
+ handling of the default config handling, including the special
+ treatment of System.Core assembly.
+
+ Fixes the REPL processing for LINQ.
+
2008-09-03 Marek Safar <marek.safar@gmail.com>
A fix for bug #422507
echo -e '"foo" == "bar";' | mono --debug gmcs.exe -v --shell
echo -e 'var a = 1;\na + 2;' | mono --debug gmcs.exe -v --shell
echo -e 'int j;\nj = 1;' | mono --debug gmcs.exe -v --shell
+ echo -e 'var a = new int[]{1,2,3};\nfrom x in a select x;' | mono --debug gmcs.exe -v --shell
# read-eval-print-loop test target, for quickly hackign
repl:
}
}
- public static void DefineDefaultConfig ()
+ public void ProcessDefaultConfig ()
{
+ bool need_system_core = RootContext.Version > LanguageVersion.ISO_2;
+
+ if (!load_default_config){
+ //
+ // Yet another SRE related problem, we have to always load System.Core
+ // even with -noconfig, otherwise the check for ExtensionAttribute in
+ // loaded assemblies won't work
+ //
+ Console.WriteLine ("HERE");
+ if (need_system_core && references.Count != 0 && Driver.OutputFile != "System.Core.dll")
+ soft_references.Add ("System.Core");
+
+ return;
+ }
+
//
// For now the "default config" is harcoded into the compiler
// we can move this outside later
};
soft_references.AddRange (default_config);
+
+ if (need_system_core)
+ soft_references.Add ("System.Core");
}
public static string OutputFile
int StartInteractiveShell ()
{
- if (load_default_config)
- DefineDefaultConfig ();
+ ProcessDefaultConfig ();
return InteractiveShell.ReadEvalPrintLoop ();
}
if (RootContext.ToplevelTypes.NamespaceEntry != null)
throw new InternalErrorException ("who set it?");
- if (load_default_config)
- DefineDefaultConfig ();
-
- //
- // Yet another SRE related problem, we have to always load System.Core
- // even with -noconfig, otherwise the check for ExtensionAttribute in
- // loaded assemblies won't work
- //
- if (RootContext.Version > LanguageVersion.ISO_2 &&
- (load_default_config || references.Count != 0) &&
- Driver.OutputFile != "System.Core.dll")
- soft_references.Add ("System.Core");
+ ProcessDefaultConfig ();
//
// Load assemblies required