Handle interop better
This commit is contained in:
parent
364e71198e
commit
ac12fbb60d
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Collections.Immutable;
|
||||
using System.Linq;
|
||||
using Upsilon.BaseTypes.ScriptTypeInterfaces;
|
||||
using Upsilon.BaseTypes.UserData;
|
||||
using Upsilon.Binder;
|
||||
using Upsilon.Binder.VariableSymbols;
|
||||
using Upsilon.Evaluator;
|
||||
|
@ -52,7 +53,13 @@ namespace Upsilon.BaseTypes.ScriptFunction
|
|||
{
|
||||
continue;
|
||||
}
|
||||
var parameterType = v.GetType();
|
||||
|
||||
System.Type parameterType;
|
||||
if (v is GenericUserData ud)
|
||||
parameterType = ud.GetCSharpType();
|
||||
else
|
||||
parameterType = v.GetType();
|
||||
|
||||
if (parameterSymbol.BoundTypeDefinition != null)
|
||||
{
|
||||
var validSymbol =
|
||||
|
|
|
@ -27,15 +27,12 @@ namespace Upsilon.StandardLibraries
|
|||
{
|
||||
if (_staticScope != null)
|
||||
return _staticScope;
|
||||
lock (Scope)
|
||||
{
|
||||
var (evaluationScope, boundScope) = CreateStandardLibrary();
|
||||
_staticScope = evaluationScope;
|
||||
_staticBoundScope = boundScope;
|
||||
return _staticScope;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static BoundScope BoundScope
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue