#37 ref-parameters in event delegates fails

closed-fixed
Malte Ried
Plugin (17)
5
2010-02-07
2010-02-06
Anonymous
No

To reproduce:
- Create a class with a delegate, that have a ref parameter, and an event using this delegate:
public class TestClass {
public delegate void TestDelegate(ref string s);
public event TestDelegate TestEvent;
}
- Compile the class into an assembly
- Try to import the assembly in NClass

The import will fail with the error: "Invalid parameter declaration." Trying the import in an debugger shows that the Exception is thrown in NClass.CSharp.CSharpArgumentList.Add when it is called with the parameter "String& param" since the regular expression singleParamterRegex does not match a parameter containing an ampersand.

The attached patch seems to solve the problem.

Discussion

  • Malte Ried
    Malte Ried
    2010-02-07

    Fixed in version 2.0

    Thanks for reporting!

     
  • Malte Ried
    Malte Ried
    2010-02-07

    • status: open --> closed-fixed
     
  • Malte Ried
    Malte Ried
    2010-02-07

    Hi!

    Thanks a lot for the good bug-report! It is fixed in SVN right now.

    Malte