I currently have an issue in my DLR language implementation where subsequent calls to a method defined in the language occur with the same input parameters used by the first call to that method.
So... if I do this in my language:
PrintType( 34 );
PrintType( 34.1 );
... the output is:
Integer
Integer
Where I would expect:
Integer
Decimal
I suspect (but cannot yet confirm) that the issue results from the following:
my call binder (InvokeAction subclass) generates an appropriate Call Expression and then returns a new MetaObject with that expression and Restrictions.Empty
therefore, I think what might be happening is that the Restrictions parameter informs the DLR as to when this construct can be re-used for subsequent calls to this method, and since I place no inherent restrictions, the first construct is always re-used (sorry, my terminology here is probably wrong... hopefully you get the idea)
So... I'm thinking that I need to use a merge of Restrictions generated for each parameter... by type, or perhaps by instance.
Can someone confirm or deny my thinking? Any other possibilities I should explore, for the behavior I'm seeing?
TIA...