Permalink
Browse files

Small bugfixes, use correct form of Invoke for .net

  • Loading branch information...
1 parent b962c2f commit f0788e87b2e6c337017e1f93af38069d7dbb9d3f @sorear committed Nov 7, 2011
Showing with 4 additions and 3 deletions.
  1. +1 −0 lib/CodeGen.cs
  2. +1 −1 lib/Kernel.cs
  3. +1 −1 lib/NieczaCLR.cs
  4. +1 −1 lib/Serialize.cs
View
@@ -3946,6 +3946,7 @@ public class DowncallReceiver : CallReceiver {
return new Exception((who + "::" + key).Substring(2) + " does not name any package");
} else {
c.globals[hkey] = v = new StashEnt();
+ v.constant = true;
v.v = StashCursor.MakePackage((who + "::" + key).Substring(2), Kernel.BoxRaw<string>(who + "::" + key, Kernel.StashMO));
pkg = v.v.Fetch().mo;
}
View
@@ -5357,7 +5357,7 @@ public class MMDCandidateLongname {
try {
main_unit.InitTime();
main_unit.RunMainline();
- } catch (NieczaException n) {
+ } catch (Exception n) {
Console.Error.WriteLine("Unhandled exception: {0}", n);
Environment.Exit(1);
}
View
@@ -318,7 +318,7 @@ class OverloadCandidate : MultiCandidate {
return CLRWrapperProvider.BoxResult(mi.ReturnType, ret);
} else if (what_call is ConstructorInfo) {
ConstructorInfo ci = (ConstructorInfo) what_call;
- object ret = ci.Invoke(null, argv);
+ object ret = ci.Invoke(argv);
WritebackRefs(pos, argv);
return CLRWrapperProvider.BoxResult(ci.DeclaringType, ret);
} else if (what_call is FieldInfo) {
View
@@ -832,7 +832,7 @@ public class ReflectObj : IFreeze {
nm = nm.Replace("Run.", "");
Type nt = Type.GetType(nm, true);
ReflectObj n = (ReflectObj)
- nt.GetConstructor(new Type[0]).Invoke(null, new object[0]);
+ nt.GetConstructor(new Type[0]).Invoke(new object[0]);
tb.Register(n);
n.SetData(tb.RefsA<object>());
return n;

0 comments on commit f0788e8

Please sign in to comment.