diff options
author | leino <unknown> | 2014-12-12 20:47:27 -0800 |
---|---|---|
committer | leino <unknown> | 2014-12-12 20:47:27 -0800 |
commit | 1ad3e91e2b2945572603b8ca5bf063195e72b55f (patch) | |
tree | fe6b1c3115386138de765fc0fdcbfab7324c3efc /Source/DafnyDriver | |
parent | 91c4d57eb84d5d15e011902a1da1b70131e5a222 (diff) |
Fixed bug in /compile:3, when Main is explicitly given as a static method
Diffstat (limited to 'Source/DafnyDriver')
-rw-r--r-- | Source/DafnyDriver/DafnyDriver.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/DafnyDriver/DafnyDriver.cs b/Source/DafnyDriver/DafnyDriver.cs index 16349ccc..5918fcfa 100644 --- a/Source/DafnyDriver/DafnyDriver.cs +++ b/Source/DafnyDriver/DafnyDriver.cs @@ -354,7 +354,8 @@ namespace Microsoft.Dafny outputWriter.WriteLine();
var entry = cr.CompiledAssembly.EntryPoint;
try {
- entry.Invoke(null, new object[] { new string[0] });
+ object[] parameters = entry.GetParameters().Length == 0 ? new object[] { } : new object[] { new string[0] };
+ entry.Invoke(null, parameters);
} catch (System.Reflection.TargetInvocationException e) {
outputWriter.WriteLine("Error: Execution resulted in exception: {0}", e.Message);
outputWriter.WriteLine(e.InnerException.ToString());
|