1

Closed

C# constructor with internal visibility inaccessible when using -X:PrivateBinding

description

When specifying -X:PrivateBinding on the command line I'm unable to invoke constructors that are defined with internal visibility.
 
Example (C#):
 
internal class ParameterHandler {
 
    internal ParameterHandler( NDescription d ) { // ...
 
When calling from Iron Ruby:
 
ParameterHandler.new( @param_description )
 
I get
 
TypeError: allocator undefined for Napa::Core::ServiceFunctions::Dispatcher::ParameterHandler
 
When I change the visibility of the C# constructor to public everything works smooth.
 
 
iron ruby 0.9, win xp sp 2, Dotnet framework 3.5
Closed Jul 28, 2011 at 12:20 AM by jimmysch
Confirmed user's repro works in latest version.

comments

TomasMatousek wrote Oct 15, 2009 at 7:48 PM

We need to test thw following cases:
1) ValueTypes/Reference Types with internal non-default constructor.
2) CLR types with added "initialize" method
a) type derives from Exception and has an internal constructor that takes (string) or (string, Exception).
b) with an internal constructor that has a single RubyClass/RubyContext parameter or no parameter
3) clr_new and clr_ctor calling/getting an internal constructor