jakesays-old / runsharp

Automatically exported from code.google.com/p/runsharp
MIT License
1 stars 0 forks source link

Method with ByRef parameter failed to implement interface #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Below code to reproduce error. This was working fine in 0.1.1

    public interface IRefParamMethod
    {
        void RefParamMethod(ref long y);
    }

    class InterfaceByRefBug
    {
        public static void GenFoo(AssemblyGen tg)
        {
            TypeGen g = tg.Public.Class("InterfaceByRefBug.Foo",
typeof(object), typeof(IRefParamMethod));
            {
                g.Public.Method(typeof (void),
"RefParamMethod").Ref.Parameter(typeof (long), "l");
            }
        }
    }

And here is the stacktrace:

System.NotImplementedException was unhandled
  Message="Method 'Void RefParamMethod(Int64 ByRef)' of interface
'ConsoleApplication1.IRefParamMethod' is not implemented"
  Source="TriAxis.RunSharp"
  StackTrace:
       at TriAxis.RunSharp.TypeGen.Complete() in
R:\runsharp\RunSharp\TypeGen.cs:line 666
       at TriAxis.RunSharp.AssemblyGen.Complete() in
R:\runsharp\RunSharp\AssemblyGen.cs:line 257
       at TriAxis.RunSharp.AssemblyGen.Save() in
R:\runsharp\RunSharp\AssemblyGen.cs:line 242
       at ConsoleApplication1.Program.Main(String[] args) in
R:\runsharp\ConsoleApplication1\Program.cs:line 75
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()

Original issue reported on code.google.com by kenne...@gmail.com on 29 Oct 2009 at 3:37

GoogleCodeExporter commented 9 years ago

Original comment by StefanSi...@gmail.com on 22 Dec 2009 at 11:10